REST API reference

Complete reference on how to handle Akeneo PIM resources

Products

Product

Get list of products

This endpoint allows you to get a list of products. Products are paginated and they can be filtered. In the Enterprise Edition, since the 2.0, permissions based on your user groups are applied to the set of products you request.

Available in PIM versions: 1.7 2.x 3.x 4.0 5.0 SaaS


REQUEST

get /api/rest/v1/products

Path parameters

Ø

Query parameters

search (string ) • Filter products, for more details see the Filters section

scope (string ) • Filter product values to return scopable attributes for the given channel as well as the non localizable/non scopable attributes, for more details see the Filter product values via channel section

locales (string ) • Filter product values to return localizable attributes for the given locales as well as the non localizable/non scopable attributes, for more details see the Filter product values via locale section

attributes (string ) • Filter product values to only return those concerning the given attributes, for more details see the Filter on product values section

pagination_type (string , page by default ) • Pagination method type, see Pagination section

page (integer , 1 by default ) • Number of the page to retrieve when using the `page` pagination method type. Should never be set manually, see Pagination section

search_after (string , cursor to the first page by default ) • Cursor when using the `search_after` pagination method type. Should never be set manually, see Pagination section

limit (integer , 10 by default ) • Number of results by page, see Pagination section

with_count (boolean ) • Return the count of products in the response. Be carefull with that, on a big catalog, it can decrease performance in a significative way

with_attribute_options (boolean ) • Return labels of attribute options in the response. (Only available since the 5.0 version)

with_quality_scores (boolean ) • Return product quality scores in the response. (Only available since the 5.0 version)

with_completenesses (boolean ) • Return product completenesses in the response. (Only available on SaaS platforms)

Headers

Authorization • Equal to 'Bearer xxx', `xxx` being the authentication token, see Authentication section

Accept • Equal to 'application/json', no other value allowed

Body

Ø


RESPONSES

Return products paginated

Body Format application/json

Follow the standard format of the entity

{

_links (object) : {
    self (object ) : {
        href (string ) • URI of the current page of resources
    }
    first (object ) : {
        href (string ) • URI of the first page of resources
    }
    previous (object ) : {
        href (string ) • URI of the previous page of resources
    }
    next (object ) : {
        href (string ) • URI of the next page of resources
    }
  }

current_page (integer) • Current page number

_embedded (object) : {
    items (array ) : [
        {
          _links (object) : {
              self (object) : {
                  href (string ) • URI of the resource
              }
          }
          identifier (string) • Product identifier, i.e. the value of the only `pim_catalog_identifier` attribute
          enabled (boolean) • Whether the product is enabled
          family (string) • Family code from which the product inherits its attributes and attributes requirements
          categories (array [string ]) • Codes of the categories in which the product is classified
          groups (array [string ]) • Codes of the groups to which the product belong
          parent (string) • Code of the parent product model when the product is a variant (only available since the 2.0). This parent can be modified since the 2.3.
          values (object) : {
              attributeCode (array [object ]) : [
                  {
                    scope (string ) • Channel code of the product value
                    locale (string ) • Locale code of the product value
                    data (object ) • Product value
                    linked_data (object ) • Object containing labels of attribute options (only available since the 5.0 and when query parameter "with_attribute_options" is set to "true"). See the `linked_data` format section for more details.
                   }
              ]
          }
          associations (object) : {
              associationTypeCode (object) : {
                  groups (array [string ] ) • Array of groups codes with which the product is in relation
                  products (array [string ] ) • Array of product identifiers with which the product is in relation
                  product_models (array [string ] ) • Array of product model codes with which the product is in relation (only available since the v2.1)
              }
          }
          quantified_associations (object) : {
              quantifiedAssociationTypeCode (object) : {
                  products (array [object ] ) • Array of objects containing product identifiers and quantities with which the product is in relation
                  product_models (array [object ] ) • Array of objects containing product model codes and quantities with which the product is in relation
              }
          }
          created (string) • Date of creation
          updated (string) • Date of the last update
          metadata (object) : {
              workflow_status (string) • Status of the product regarding the user permissions (only available since the v2.0 in the Enterprise Edition)
          }
          quality_scores (object) • 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")
          completenesses (object) • Product completenesses for each channel/locale combination (only available on SaaS platforms, and when the "with_completenesses" query parameter is set to "true")
        }
    ]
  }

}

Example

{
      "_links": {
        "self": {
          "href": "https://demo.akeneo.com/api/rest/v1/products?page=3&limit=3&with_quality_scores=true&with_completenesses=true&with_attribute_options=true"
        },
        "first": {
          "href": "https://demo.akeneo.com/api/rest/v1/products?page=1&limit=3&with_quality_scores=true&with_completenesses=true&with_attribute_options=true"
        },
        "previous": {
          "href": "https://demo.akeneo.com/api/rest/v1/products?page=2&limit=3&with_quality_scores=true&with_completenesses=true&with_attribute_options=true"
        },
        "next": {
          "href": "https://demo.akeneo.com/api/rest/v1/products?page=4&limit=3&with_quality_scores=true&with_completenesses=true&with_attribute_options=true"
        }
      },
      "current_page": 3,
      "_embedded": {
        "items": [
          {
            "_links": {
              "self": {
                "href": "https://demo.akeneo.com/api/rest/v1/product/top"
              }
            },
            "identifier": "top",
            "family": "tshirt",
            "groups": [],
            "parent": null,
            "categories": [
              "summer_collection"
            ],
            "enabled": true,
            "values": {
              "name": [
                {
                  "data": "Top",
                  "locale": "en_US",
                  "scope": null
                },
                {
                  "data": "Débardeur",
                  "locale": "fr_FR",
                  "scope": null
                }
              ],
              "description": [
                {
                  "data": "Summer top",
                  "locale": "en_US",
                  "scope": "ecommerce"
                },
                {
                  "data": "Top",
                  "locale": "en_US",
                  "scope": "tablet"
                },
                {
                  "data": "Débardeur pour l'été",
                  "locale": "fr_FR",
                  "scope": "ecommerce"
                },
                {
                  "data": "Débardeur",
                  "locale": "fr_FR",
                  "scope": "tablet"
                }
              ],
              "price": [
                {
                  "locale": null,
                  "scope": null,
                  "data": [
                    {
                      "amount": "15.5",
                      "currency": "EUR"
                    },
                    {
                      "amount": "15",
                      "currency": "USD"
                    }
                  ]
                }
              ],
              "color": [
                {
                  "locale": null,
                  "scope": null,
                  "data": "black",
                  "linked_data": {
                    "attribute": "color",
                    "code": "black",
                    "labels": {
                      "en_US": "Black",
                      "fr_FR": "Noir"
                    }
                  }
                }
              ],
              "size": [
                {
                  "locale": null,
                  "scope": null,
                  "data": "m",
                  "linked_data": {
                    "attribute": "size",
                    "code": "m",
                    "labels": {
                      "en_US": "M",
                      "fr_FR": "M"
                    }
                  }
                }
              ],
              "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"
                      }
                    }
                  }
                }
              ]
            },
            "created": "2016-06-23T18:24:44+02:00",
            "updated": "2016-06-25T17:56:12+02:00",
            "associations": {
              "PACK": {
                "products": [
                  "sunglasses"
                ],
                "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": 20
              },
              {
                "scope": "ecommerce",
                "locale": "fr_FR",
                "data": 30
              },
              {
                "scope": "tablet",
                "locale": "en_US",
                "data": 55
              },
              {
                "scope": "tablet",
                "locale": "fr_FR",
                "data": 70
              }
            ]
          },
          {
            "_links": {
              "self": {
                "href": "https://demo.akeneo.com/api/rest/v1/product/cap"
              }
            },
            "identifier": "cap",
            "family": "caps",
            "groups": [],
            "parent": null,
            "categories": [
              "summer_collection"
            ],
            "enabled": true,
            "values": {
              "name": [
                {
                  "data": "Cap",
                  "locale": "en_US",
                  "scope": null
                },
                {
                  "data": "Casquette",
                  "locale": "fr_FR",
                  "scope": null
                }
              ],
              "description": [
                {
                  "data": "Cap unisex",
                  "locale": "en_US",
                  "scope": "ecommerce"
                },
                {
                  "data": "Cap unisex",
                  "locale": "en_US",
                  "scope": "tablet"
                },
                {
                  "data": "Casquette unisexe",
                  "locale": "fr_FR",
                  "scope": "ecommerce"
                },
                {
                  "data": "Casquette unisexe",
                  "locale": "fr_FR",
                  "scope": "tablet"
                }
              ],
              "price": [
                {
                  "locale": null,
                  "scope": null,
                  "data": [
                    {
                      "amount": "20",
                      "currency": "EUR"
                    },
                    {
                      "amount": "20",
                      "currency": "USD"
                    }
                  ]
                }
              ],
              "color": [
                {
                  "locale": null,
                  "scope": null,
                  "data": "black",
                  "linked_data": {
                    "attribute": "color",
                    "code": "black",
                    "labels": {
                      "en_US": "Black",
                      "fr_FR": "Noir"
                    }
                  }
                }
              ]
            },
            "created": "2016-06-23T18:24:44+02:00",
            "updated": "2016-06-25T17:56:12+02:00",
            "associations": {
              "PACK": {
                "products": [
                  "sunglasses"
                ],
                "product_models": [],
                "groups": []
              }
            },
            "quantified_associations": {},
            "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": 20
              },
              {
                "scope": "ecommerce",
                "locale": "fr_FR",
                "data": 30
              },
              {
                "scope": "tablet",
                "locale": "en_US",
                "data": 55
              },
              {
                "scope": "tablet",
                "locale": "fr_FR",
                "data": 70
              }
            ]
          },
          {
            "_links": {
              "self": {
                "href": "https://demo.akeneo.com/api/rest/v1/product/sweat"
              }
            },
            "identifier": "sweat",
            "family": null,
            "groups": [],
            "parent": null,
            "categories": [
              "winter_collection"
            ],
            "enabled": true,
            "values": {},
            "created": "2016-06-23T11:24:44+02:00",
            "updated": "2016-06-23T11:24:44+02:00",
            "associations": {},
            "quantified_associations": {},
            "quality_scores": {},
            "completenesses": {}
          }
        ]
      }
    }

Authentication required

Can be caused by a missing or expired token

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 401,
      "message": "Authentication is required"
    }

Access forbidden

The user does not have the permission to execute this request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 403,
      "message": "Access forbidden. You are not allowed to list categories."
    }

Not Acceptable

The `Accept` header is not `application/json` but it should

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 406,
      "message": "‘xxx’ in ‘Accept‘ header is not valid. Only ‘application/json‘ is allowed."
    }

Unprocessable entity

The validation of the entity given in the body of the request failed

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 422,
      "message": "Property \"labels\" expects an array as data, \"NULL\" given. Check the API reference documentation.",
      "_links": {
        "documentation": {
          "href": "http://api.akeneo.com/api-reference.html"
        }
      }
    }

Create a new product

This endpoint allows you to create a new product. In the Enterprise Edition, since the v2.0, permissions based on your user groups are applied to the product you try to create.

Available in PIM versions: 1.7 2.x 3.x 4.0 5.0 SaaS


REQUEST

post /api/rest/v1/products

Path parameters

Ø

Query parameters

Ø

Headers

Authorization • Equal to 'Bearer xxx', `xxx` being the authentication token, see Authentication section

Content-type • Equal to 'application/json', no other value allowed

Body

Follow the standard format of the entity

{

identifier (string ) • Product identifier, i.e. the value of the only `pim_catalog_identifier` attribute

enabled (boolean , true by default) • Whether the product is enabled

family (string , null only in the case of a non variant product by default) • Family code from which the product inherits its attributes and attributes requirements

categories (array [string] , [] by default) • Codes of the categories in which the product is classified

groups (array [string] , [] by default) • Codes of the groups to which the product belong

parent (string , null by default) • Code of the parent product model when the product is a variant (only available since the 2.0). This parent can be modified since the 2.3.

values (object { attributeCode : array [ object { scope : string , locale : string , data : object , linked_data : object } ] } ) • Product attributes values, see Product values section for more details

associations (object { associationTypeCode : object { groups : array [string] , products : array [string] , product_models : array [string] } } ) • Several associations related to groups, product models and/or other products, grouped by association types

quantified_associations (object { quantifiedAssociationTypeCode : object { products : array [object] , product_models : array [object] } } ) • Several quantified associations related to products and/or product models, grouped by quantified association types (only available since the 5.0)

}

Example

{
      "identifier": "top",
      "enabled": true,
      "family": "tshirt",
      "categories": [
        "summer_collection"
      ],
      "groups": [],
      "parent": null,
      "values": {
        "name": [
          {
            "data": "Top",
            "locale": "en_US",
            "scope": null
          },
          {
            "data": "Débardeur",
            "locale": "fr_FR",
            "scope": null
          }
        ],
        "description": [
          {
            "data": "Summer top",
            "locale": "en_US",
            "scope": "ecommerce"
          },
          {
            "data": "Top",
            "locale": "en_US",
            "scope": "tablet"
          },
          {
            "data": "Débardeur pour l'été",
            "locale": "fr_FR",
            "scope": "ecommerce"
          },
          {
            "data": "Débardeur",
            "locale": "fr_FR",
            "scope": "tablet"
          }
        ],
        "price": [
          {
            "locale": null,
            "scope": null,
            "data": [
              {
                "amount": "15.5",
                "currency": "EUR"
              },
              {
                "amount": "15",
                "currency": "USD"
              }
            ]
          }
        ],
        "color": [
          {
            "locale": null,
            "scope": null,
            "data": "black",
            "linked_data": {
              "attribute": "color",
              "code": "black",
              "labels": {
                "en_US": "Black",
                "fr_FR": "Noir"
              }
            }
          }
        ],
        "size": [
          {
            "locale": null,
            "scope": null,
            "data": "m",
            "linked_data": {
              "attribute": "size",
              "code": "m",
              "labels": {
                "en_US": "M",
                "fr_FR": "M"
              }
            }
          }
        ],
        "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"
                }
              }
            }
          }
        ]
      },
      "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
            }
          ]
        }
      }
    }

RESPONSES

Created

Means that the creation was successful

Headers

Location • URI of the created resource

Body Format application/json

Ø

Bad request

Can be caused by a malformed JSON request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 400,
      "message": "Invalid JSON message received"
    }

Authentication required

Can be caused by a missing or expired token

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 401,
      "message": "Authentication is required"
    }

Access forbidden

The user does not have the permission to execute this request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 403,
      "message": "Access forbidden. You are not allowed to list categories."
    }

Unsupported Media type

The `Content-type` header has to be `application/json`

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 415,
      "message": "‘xxx’ in ‘Content-type’ header is not valid.  Only ‘application/json’ is allowed."
    }

Unprocessable entity

The validation of the entity given in the body of the request failed

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 422,
      "message": "Property \"labels\" expects an array as data, \"NULL\" given. Check the API reference documentation.",
      "_links": {
        "documentation": {
          "href": "http://api.akeneo.com/api-reference.html"
        }
      }
    }

Update/create several products

This endpoint allows you to update and/or create several products at once. Learn more about Update behavior. Note that if no product exists for the given identifier, it creates it. In the Enterprise Edition, since the v2.0, 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.

Available in PIM versions: 1.7 2.x 3.x 4.0 5.0 SaaS


REQUEST

patch /api/rest/v1/products

Path parameters

Ø

Query parameters

Ø

Headers

Authorization • Equal to 'Bearer xxx', `xxx` being the authentication token, see Authentication section

Content-type • Equal to 'application/vnd.akeneo.collection+json', no other value allowed

Body

Contains several lines, each line is a product in JSON standard format

{

identifier (string ) • Product identifier, i.e. the value of the only `pim_catalog_identifier` attribute

enabled (boolean , true by default) • Whether the product is enabled

family (string , null only in the case of a non variant product by default) • Family code from which the product inherits its attributes and attributes requirements

categories (array [string] , [] by default) • Codes of the categories in which the product is classified

groups (array [string] , [] by default) • Codes of the groups to which the product belong

parent (string , null by default) • Code of the parent product model when the product is a variant (only available since the 2.0). This parent can be modified since the 2.3.

values (object { attributeCode : array [ object { scope : string , locale : string , data : object , linked_data : object } ] } ) • Product attributes values, see Product values section for more details

associations (object { associationTypeCode : object { groups : array [string] , products : array [string] , product_models : array [string] } } ) • Several associations related to groups, product models and/or other products, grouped by association types

quantified_associations (object { quantifiedAssociationTypeCode : object { products : array [object] , product_models : array [object] } } ) • Several quantified associations related to products and/or product models, grouped by quantified association types (only available since the 5.0)

created (string ) • Date of creation

updated (string ) • Date of the last update

metadata (object { workflow_status : string } ) • More information around the product (only available since the v2.0 in the Enterprise Edition)

quality_scores (object ) • 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")

completenesses (object ) • Product completenesses for each channel/locale combination (only available on SaaS platforms, and when the "with_completenesses" query parameter is set to "true")

}

Example

{"identifier":"cap","values":{"description":[{"scope":"ecommerce","locale":"en_US","data":"My amazing cap"}]}}
    {"identifier":"mug","group":["promotion"]}
    {"identifier":"tshirt","family":"clothes"}

RESPONSES

OK

Returns a plain text response whose lines are JSON containing the status of each update or creation

Body Format application/json

{

line (integer ) • Line number

identifier (string ) • Resource identifier, only filled when the resource is a product

code (string ) • Resource code, only filled when the resource is not a product

status_code (integer ) • HTTP status code, see Client errors to understand the meaning of each code

message (string ) • Message explaining the error

}

Example

{"line":1,"identifier":"cap","status_code":204}
    {"line":2,"identifier":"mug","status_code":422,"message":"Property "group" does not exist."}
    {"line":3,"identifier":"tshirt","status_code":201}

Authentication required

Can be caused by a missing or expired token

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 401,
      "message": "Authentication is required"
    }

Access forbidden

The user does not have the permission to execute this request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 403,
      "message": "Access forbidden. You are not allowed to list categories."
    }

Request Entity Too Large

There are too many resources to process (max 100) or the line of JSON is too long (max 1 000 000 characters)

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 413,
      "message": "Too many resources to process, 100 is the maximum allowed."
    }

Unsupported Media type

The `Content-type` header has to be `application/vnd.akeneo.collection+json`

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 415,
      "message": "‘xxx’ in ‘Content-type’ header is not valid.  Only ‘application/vnd.akeneo.collection+json’ is allowed."
    }

Get a product

This endpoint allows you to get the information about a given product. In the Entreprise Edition, since the v2.0, permissions based on your user groups are applied to the product you request.

Available in PIM versions: 1.7 2.x 3.x 4.0 5.0 SaaS


REQUEST

get /api/rest/v1/products/{code}

Path parameters

code (string) • Code of the resource

Query parameters

with_attribute_options (boolean ) • Return labels of attribute options in the response. (Only available since the 5.0 version)

with_quality_scores (boolean ) • Return product quality scores in the response. (Only available since the 5.0 version)

with_completenesses (boolean ) • Return product completenesses in the response. (Only available on SaaS platforms)

Headers

Authorization • Equal to 'Bearer xxx', `xxx` being the authentication token, see Authentication section

Accept • Equal to 'application/json', no other value allowed

Body

Ø


RESPONSES

OK

Returns the content of the product in JSON standard format

Body Format application/json

Follow the standard format of the entity

{

identifier (string ) • Product identifier, i.e. the value of the only `pim_catalog_identifier` attribute

enabled (boolean ) • Whether the product is enabled

family (string ) • Family code from which the product inherits its attributes and attributes requirements

categories (array [string] ) • Codes of the categories in which the product is classified

groups (array [string] ) • Codes of the groups to which the product belong

parent (string ) • Code of the parent product model when the product is a variant (only available since the 2.0). This parent can be modified since the 2.3.

values (object ) : {
    attributeCode (array [object] ) : [
        {
            scope (string ) • Channel code of the product value
            locale (string ) • Locale code of the product value
            data (object ) • Product value
            linked_data (object ) • Object containing labels of attribute options (only available since the 5.0 and when query parameter "with_attribute_options" is set to "true"). See the `linked_data` format section for more details.
        }
    ]
  }

associations (object ) : {
    associationTypeCode (object ) : {
        groups (array [string] ) • Array of groups codes with which the product is in relation
        products (array [string] ) • Array of product identifiers with which the product is in relation
        product_models (array [string] ) • Array of product model codes with which the product is in relation (only available since the v2.1)
    }
  }

quantified_associations (object ) : {
    quantifiedAssociationTypeCode (object ) : {
        products (array [object] ) • Array of objects containing product identifiers and quantities with which the product is in relation
        product_models (array [object] ) • Array of objects containing product model codes and quantities with which the product is in relation
    }
  }

created (string ) • Date of creation

updated (string ) • Date of the last update

metadata (object ) : {
    workflow_status (string ) • Status of the product regarding the user permissions (only available since the v2.0 in the Enterprise Edition)
  }

quality_scores (object ) • 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")

completenesses (object ) • Product completenesses for each channel/locale combination (only available on SaaS platforms, and when the "with_completenesses" query parameter is set to "true")

}

Example

{
      "identifier": "top",
      "enabled": true,
      "family": "tshirt",
      "categories": [
        "summer_collection"
      ],
      "groups": [],
      "parent": null,
      "values": {
        "name": [
          {
            "data": "Top",
            "locale": "en_US",
            "scope": null
          },
          {
            "data": "Débardeur",
            "locale": "fr_FR",
            "scope": null
          }
        ],
        "description": [
          {
            "data": "Summer top",
            "locale": "en_US",
            "scope": "ecommerce"
          },
          {
            "data": "Top",
            "locale": "en_US",
            "scope": "tablet"
          },
          {
            "data": "Débardeur pour l'été",
            "locale": "fr_FR",
            "scope": "ecommerce"
          },
          {
            "data": "Débardeur",
            "locale": "fr_FR",
            "scope": "tablet"
          }
        ],
        "price": [
          {
            "locale": null,
            "scope": null,
            "data": [
              {
                "amount": "15.5",
                "currency": "EUR"
              },
              {
                "amount": "15",
                "currency": "USD"
              }
            ]
          }
        ],
        "color": [
          {
            "locale": null,
            "scope": null,
            "data": "black",
            "linked_data": {
              "attribute": "color",
              "code": "black",
              "labels": {
                "en_US": "Black",
                "fr_FR": "Noir"
              }
            }
          }
        ],
        "size": [
          {
            "locale": null,
            "scope": null,
            "data": "m",
            "linked_data": {
              "attribute": "size",
              "code": "m",
              "labels": {
                "en_US": "M",
                "fr_FR": "M"
              }
            }
          }
        ],
        "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"
                }
              }
            }
          }
        ]
      },
      "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
        }
      ]
    }

Authentication required

Can be caused by a missing or expired token

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 401,
      "message": "Authentication is required"
    }

Access forbidden

The user does not have the permission to execute this request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 403,
      "message": "Access forbidden. You are not allowed to list categories."
    }

Resource not found

The resource code given in the URI does not correspond to any existing PIM resource

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 404,
      "message": "Resource `my_resource_code` does not exist."
    }

Not Acceptable

The `Accept` header is not `application/json` but it should

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 406,
      "message": "‘xxx’ in ‘Accept‘ header is not valid. Only ‘application/json‘ is allowed."
    }

Update/create a product

This endpoint allows you to update a given product. Learn more about Update behavior. Note that if no product exists for the given identifier, it creates it. In the Entreprise Edition, since the v2.0, permissions based on your user groups are applied to the product you try to update. It may result in the creation of a draft if you only have edit rights through the product's categories.

Available in PIM versions: 1.7 2.x 3.x 4.0 5.0 SaaS


REQUEST

patch /api/rest/v1/products/{code}

Path parameters

code (string) • Code of the resource

Query parameters

Ø

Headers

Authorization • Equal to 'Bearer xxx', `xxx` being the authentication token, see Authentication section

Content-type • Equal to 'application/json', no other value allowed

Body

Follow the standard format of the entity

{

identifier (string ) • Product identifier, i.e. the value of the only `pim_catalog_identifier` attribute

enabled (boolean , true by default) • Whether the product is enabled

family (string , null only in the case of a non variant product by default) • Family code from which the product inherits its attributes and attributes requirements

categories (array [string] , [] by default) • Codes of the categories in which the product is classified

groups (array [string] , [] by default) • Codes of the groups to which the product belong

parent (string , null by default) • Code of the parent product model when the product is a variant (only available since the 2.0). This parent can be modified since the 2.3.

values (object { attributeCode : array [ object { scope : string , locale : string , data : object , linked_data : object } ] } ) • Product attributes values, see Product values section for more details

associations (object { associationTypeCode : object { groups : array [string] , products : array [string] , product_models : array [string] } } ) • Several associations related to groups, product models and/or other products, grouped by association types

quantified_associations (object { quantifiedAssociationTypeCode : object { products : array [object] , product_models : array [object] } } ) • Several quantified associations related to products and/or product models, grouped by quantified association types (only available since the 5.0)

created (string ) • Date of creation

updated (string ) • Date of the last update

metadata (object { workflow_status : string } ) • More information around the product (only available since the v2.0 in the Enterprise Edition)

quality_scores (object ) • 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")

completenesses (object ) • Product completenesses for each channel/locale combination (only available on SaaS platforms, and when the "with_completenesses" query parameter is set to "true")

}

Example

{
      "identifier": "top",
      "enabled": true,
      "family": "tshirt",
      "categories": [
        "summer_collection"
      ],
      "groups": [],
      "parent": null,
      "values": {
        "name": [
          {
            "data": "Top",
            "locale": "en_US",
            "scope": null
          },
          {
            "data": "Débardeur",
            "locale": "fr_FR",
            "scope": null
          }
        ],
        "description": [
          {
            "data": "Summer top",
            "locale": "en_US",
            "scope": "ecommerce"
          },
          {
            "data": "Top",
            "locale": "en_US",
            "scope": "tablet"
          },
          {
            "data": "Débardeur pour l'été",
            "locale": "fr_FR",
            "scope": "ecommerce"
          },
          {
            "data": "Débardeur",
            "locale": "fr_FR",
            "scope": "tablet"
          }
        ],
        "price": [
          {
            "locale": null,
            "scope": null,
            "data": [
              {
                "amount": "15.5",
                "currency": "EUR"
              },
              {
                "amount": "15",
                "currency": "USD"
              }
            ]
          }
        ],
        "color": [
          {
            "locale": null,
            "scope": null,
            "data": "black",
            "linked_data": {
              "attribute": "color",
              "code": "black",
              "labels": {
                "en_US": "Black",
                "fr_FR": "Noir"
              }
            }
          }
        ],
        "size": [
          {
            "locale": null,
            "scope": null,
            "data": "m",
            "linked_data": {
              "attribute": "size",
              "code": "m",
              "labels": {
                "en_US": "M",
                "fr_FR": "M"
              }
            }
          }
        ],
        "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"
                }
              }
            }
          }
        ]
      },
      "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
        }
      ]
    }

RESPONSES

Created

Means that the creation was successful

Headers

Location • URI of the created resource

Body Format application/json

Ø

No content to return

Means that the update was successful

Headers

Location • URI of the updated resource

Body Format application/json

Ø

Authentication required

Can be caused by a missing or expired token

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 401,
      "message": "Authentication is required"
    }

Access forbidden

The user does not have the permission to execute this request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 403,
      "message": "Access forbidden. You are not allowed to list categories."
    }

Unsupported Media type

The `Content-type` header has to be `application/json`

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 415,
      "message": "‘xxx’ in ‘Content-type’ header is not valid.  Only ‘application/json’ is allowed."
    }

Unprocessable entity

The validation of the entity given in the body of the request failed

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 422,
      "message": "Property \"labels\" expects an array as data, \"NULL\" given. Check the API reference documentation.",
      "_links": {
        "documentation": {
          "href": "http://api.akeneo.com/api-reference.html"
        }
      }
    }

Delete a product

This endpoint allows you to delete a given product. In the Enterprise Edition, since the 2.0, permissions based on your user groups are applied to the product you try to delete.

Available in PIM versions: 1.7 2.x 3.x 4.0 5.0 SaaS


REQUEST

delete /api/rest/v1/products/{code}

Path parameters

code (string) • Code of the resource

Query parameters

Ø

Headers

Authorization • Equal to 'Bearer xxx', `xxx` being the authentication token, see Authentication section

Accept • Equal to 'application/json', no other value allowed

Body

Ø


RESPONSES

No content to return

Means that the deletion was successful

Body Format application/json

Ø

Authentication required

Can be caused by a missing or expired token

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 401,
      "message": "Authentication is required"
    }

Access forbidden

The user does not have the permission to execute this request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 403,
      "message": "Access forbidden. You are not allowed to list categories."
    }

Resource not found

The resource code given in the URI does not correspond to any existing PIM resource

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 404,
      "message": "Resource `my_resource_code` does not exist."
    }

Product media file

Get a list of product media files

This endpoint allows you to get a list of media files that are used as attribute values in products or product models.

Available in PIM versions: 1.7 2.x 3.x 4.0 5.0 SaaS


REQUEST

get /api/rest/v1/media-files

Path parameters

Ø

Query parameters

page (integer , 1 by default ) • Number of the page to retrieve when using the `page` pagination method type. Should never be set manually, see Pagination section

limit (integer , 10 by default ) • Number of results by page, see Pagination section

with_count (boolean ) • Return the count of products in the response. Be carefull with that, on a big catalog, it can decrease performance in a significative way

Headers

Authorization • Equal to 'Bearer xxx', `xxx` being the authentication token, see Authentication section

Accept • Equal to 'application/json', no other value allowed

Body

Ø


RESPONSES

Return media files paginated

Body Format application/json

Follow the standard format of the entity

{

_links (object) : {
    self (object ) : {
        href (string ) • URI of the current page of resources
    }
    first (object ) : {
        href (string ) • URI of the first page of resources
    }
    previous (object ) : {
        href (string ) • URI of the previous page of resources
    }
    next (object ) : {
        href (string ) • URI of the next page of resources
    }
  }

current_page (integer) • Current page number

_embedded (object) : {
    items (array ) : [
        {
          _links (object) : {
              self (object) : {
                  href (string ) • URI to get the metadata of the media file
              }
              download (object) : {
                  href (string ) • URI to download the binaries of the media file
              }
          }
          code (string) • Media file code
          original_filename (string) • Original filename of the media file
          mime_type (string) • Mime type of the media file
          size (integer) • Size of the media file
          extension (string) • Extension of the media file
        }
    ]
  }

}

Example

{
      "_links": {
        "self": {
          "href": "https://demo.akeneo.com/api/rest/v1/media-files?page=2&limit=4"
        },
        "first": {
          "href": "https://demo.akeneo.com/api/rest/v1/media-files?page=1&limit=4"
        },
        "previous": {
          "href": "https://demo.akeneo.com/api/rest/v1/media-files?page=1&limit=4"
        },
        "next": {
          "href": "https://demo.akeneo.com/api/rest/v1/media-files?page=2&limit=4"
        }
      },
      "current_page": 2,
      "_embedded": {
        "items": [
          {
            "_links": {
              "self": {
                "href": "https://demo.akeneo.com/api/rest/v1/media-files/7/5/8/e/758e39d48ea7b42a55091434fd3d8b6cf3189b7f_10806799_1356.jpg"
              },
              "download": {
                "href": "https://demo.akeneo.com/api/rest/v1/media-files/7/5/8/e/758e39d48ea7b42a55091434fd3d8b6cf3189b7f_10806799_1356.jpg/download"
              }
            },
            "code": "7/5/8/e/758e39d48ea7b42a55091434fd3d8b6cf3189b7f_10806799_1356.jpg",
            "original_filename": "10806799-1356.jpg",
            "mime_type": "image/jpeg",
            "size": 16070,
            "extension": "jpg"
          },
          {
            "_links": {
              "self": {
                "href": "https://demo.akeneo.com/api/rest/v1/media-files/d/0/3/2/d032a92d994df3ef67ee6746b7b7a795c2964e7c_10734346_1480.jpg"
              },
              "download": {
                "href": "https://demo.akeneo.com/api/rest/v1/media-files/d/0/3/2/d032a92d994df3ef67ee6746b7b7a795c2964e7c_10734346_1480.jpg/download"
              }
            },
            "code": "d/0/3/2/d032a92d994df3ef67ee6746b7b7a795c2964e7c_10734346_1480.jpg",
            "original_filename": "10734346-1480.jpg",
            "mime_type": "image/jpeg",
            "size": 16454,
            "extension": "jpg"
          },
          {
            "_links": {
              "self": {
                "href": "https://demo.akeneo.com/api/rest/v1/media-files/5/1/d/8/51d81dc778ba1501a8f998f3ab5797569f3b9e25_12431976_8797.jpg"
              },
              "download": {
                "href": "https://demo.akeneo.com/api/rest/v1/media-files/5/1/d/8/51d81dc778ba1501a8f998f3ab5797569f3b9e25_12431976_8797.jpg/download"
              }
            },
            "code": "5/1/d/8/51d81dc778ba1501a8f998f3ab5797569f3b9e25_12431976_8797.jpg",
            "original_filename": "12431976-8797.jpg",
            "mime_type": "image/jpeg",
            "size": 19725,
            "extension": "jpg"
          },
          {
            "_links": {
              "self": {
                "href": "https://demo.akeneo.com/api/rest/v1/media-files/0/c/b/0/0cb0c0e115dedba676f8d1ad8343e6207ab54c7b_107406_9841.jpg"
              },
              "download": {
                "href": "https://demo.akeneo.com/api/rest/v1/media-files/0/c/b/0/0cb0c0e115dedba676f8d1ad8343e6207ab54c7b_107406_9841.jpg/download"
              }
            },
            "code": "0/c/b/0/0cb0c0e115dedba676f8d1ad8343e6207ab54c7b_107406_9841.jpg",
            "original_filename": "107406-9841.jpg",
            "mime_type": "image/jpeg",
            "size": 17639,
            "extension": "jpg"
          }
        ]
      }
    }

Authentication required

Can be caused by a missing or expired token

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 401,
      "message": "Authentication is required"
    }

Access forbidden

The user does not have the permission to execute this request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 403,
      "message": "Access forbidden. You are not allowed to list categories."
    }

Not Acceptable

The `Accept` header is not `application/json` but it should

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 406,
      "message": "‘xxx’ in ‘Accept‘ header is not valid. Only ‘application/json‘ is allowed."
    }

Create a new product media file

This endpoint allows you to create a new media file and associate it to an attribute value of a given product or product model.

Available in PIM versions: 1.7 2.x 3.x 4.0 5.0 SaaS


REQUEST

post /api/rest/v1/media-files

Path parameters

Ø

Query parameters

Ø

Headers

Authorization • Equal to 'Bearer xxx', `xxx` being the authentication token, see Authentication section

Content-type • Equal to 'multipart/form-data', no other value allowed

Body

Given as form-data

product (string ) • The product to which the media file will be associated. It is a JSON string that follows this format '{"identifier":"product_identifier", "attribute":"attribute_code", "scope":"channel_code","locale":"locale_code"}'. You have to either use this field or the `product_model` field, but not both at the same time.

product_model (string ) • The product model to which the media file will be associated. It is a JSON string that follows this format '{"code":"product_model_code", "attribute":"attribute_code", "scope":"channel_code","locale":"locale_code"}'. You have to either use this field or the `product` field, but not both at the same time.

file (string / binary) • The binaries of the file


RESPONSES

Created

Means that the creation was successful

Headers

Location • URI of the created resource

Body Format application/json

Ø

Bad request

Can be caused by a malformed JSON request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 400,
      "message": "Invalid JSON message received"
    }

Authentication required

Can be caused by a missing or expired token

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 401,
      "message": "Authentication is required"
    }

Access forbidden

The user does not have the permission to execute this request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 403,
      "message": "Access forbidden. You are not allowed to list categories."
    }

Unsupported Media type

The `Content-type` header has to be `multipart/form-data`

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 415,
      "message": "‘xxx’ in ‘Content-type’ header is not valid.  Only ‘multipart/form-data’ is allowed."
    }

Unprocessable entity

The validation of the entity given in the body of the request failed

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 422,
      "message": "Property \"labels\" expects an array as data, \"NULL\" given. Check the API reference documentation.",
      "_links": {
        "documentation": {
          "href": "http://api.akeneo.com/api-reference.html"
        }
      }
    }

Get a product media file

This endpoint allows you to get the information about a given media file that is used as an attribute value of a product or a product model.

Available in PIM versions: 1.7 2.x 3.x 4.0 5.0 SaaS


REQUEST

get /api/rest/v1/media-files/{code}

Path parameters

code (string) • Code of the resource

Query parameters

Ø

Headers

Authorization • Equal to 'Bearer xxx', `xxx` being the authentication token, see Authentication section

Accept • Equal to 'application/json', no other value allowed

Body

Ø


RESPONSES

OK

Returns the content of the media file in JSON standard format

Body Format application/json

Follow the standard format of the entity

{

_links (object) : {
    download (object ) : {
        href (string ) • URI to download the binaries of the media file
    }
  }

code (string) • Media file code

original_filename (string) • Original filename of the media file

mime_type (string) • Mime type of the media file

size (integer) • Size of the media file

extension (string) • Extension of the media file

}

Example

{
      "_links": {
        "download": {
          "href": "https://demo.akeneo.com/api/rest/v1/media-files/7/5/8/e/758e39d48ea7b42a55091434fd3d8b6cf3189b7f_10806799_1356.jpg/download"
        }
      },
      "code": "7/5/8/e/758e39d48ea7b42a55091434fd3d8b6cf3189b7f_10806799_1356.jpg",
      "original_filename": "10806799-1356.jpg",
      "mime_type": "image/jpeg",
      "size": 16070,
      "extension": "jpg"
    }

Authentication required

Can be caused by a missing or expired token

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 401,
      "message": "Authentication is required"
    }

Access forbidden

The user does not have the permission to execute this request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 403,
      "message": "Access forbidden. You are not allowed to list categories."
    }

Resource not found

The resource code given in the URI does not correspond to any existing PIM resource

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 404,
      "message": "Resource `my_resource_code` does not exist."
    }

Not Acceptable

The `Accept` header is not `application/json` but it should

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 406,
      "message": "‘xxx’ in ‘Accept‘ header is not valid. Only ‘application/json‘ is allowed."
    }

Download a product media file

This endpoint allows you to download a given media file that is used as an attribute value of a product or a product model.

Available in PIM versions: 1.7 2.x 3.x 4.0 5.0 SaaS


REQUEST

get /api/rest/v1/media-files/{code}/download

Path parameters

code (string) • Code of the resource

Query parameters

Ø

Headers

Authorization • Equal to 'Bearer xxx', `xxx` being the authentication token, see Authentication section

Body

Ø


RESPONSES

OK

Returns the binary of the media file

Body Format Mime-type of the media file
Media file binary

Authentication required

Can be caused by a missing or expired token

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 401,
      "message": "Authentication is required"
    }

Access forbidden

The user does not have the permission to execute this request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 403,
      "message": "Access forbidden. You are not allowed to list categories."
    }

Resource not found

The resource code given in the URI does not correspond to any existing PIM resource

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 404,
      "message": "Resource `my_resource_code` does not exist."
    }

Catalog structure

Family

Get list of families

This endpoint allows you to get a list of families. Families are paginated and sorted by code.

Available in PIM versions: 1.7 2.x 3.x 4.0 5.0 SaaS


REQUEST

get /api/rest/v1/families

Path parameters

Ø

Query parameters

search (string ) • Filter families, for more details see the Filters section.

page (integer , 1 by default ) • Number of the page to retrieve when using the `page` pagination method type. Should never be set manually, see Pagination section

limit (integer , 10 by default ) • Number of results by page, see Pagination section

with_count (boolean ) • Return the count of products in the response. Be carefull with that, on a big catalog, it can decrease performance in a significative way

Headers

Authorization • Equal to 'Bearer xxx', `xxx` being the authentication token, see Authentication section

Accept • Equal to 'application/json', no other value allowed

Body

Ø


RESPONSES

Return families paginated

Body Format application/json

Follow the standard format of the entity

{

_links (object) : {
    self (object ) : {
        href (string ) • URI of the current page of resources
    }
    first (object ) : {
        href (string ) • URI of the first page of resources
    }
    previous (object ) : {
        href (string ) • URI of the previous page of resources
    }
    next (object ) : {
        href (string ) • URI of the next page of resources
    }
  }

current_page (integer) • Current page number

_embedded (object) : {
    items (array ) : [
        {
          _links (object) : {
              self (object) : {
                  href (string ) • URI of the resource
              }
          }
          code (string) • Family code
          attribute_as_label (string) • Attribute code used as label
          attribute_as_image (string) • Attribute code used as the main picture in the user interface (only since v2.0)
          attributes (array [string ]) • Attributes codes that compose the family
          attribute_requirements (object) : {
              channelCode (array [string ]) • Attributes codes of the family that are required for the completeness calculation for the channel `channelCode`
          }
          labels (object) : {
              localeCode (string) • Family label for the locale `localeCode`
          }
        }
    ]
  }

}

Example

{
      "_links": {
        "self": {
          "href": "https://demo.akeneo.com/api/rest/v1/families?page=2&limit=2"
        },
        "first": {
          "href": "https://demo.akeneo.com/api/rest/v1/families?page=1&limit=2"
        },
        "previous": {
          "href": "https://demo.akeneo.com/api/rest/v1/families?page=1&limit=2"
        },
        "next": {
          "href": "https://demo.akeneo.com/api/rest/v1/families?page=3&limit=2"
        }
      },
      "current_page": 2,
      "_embedded": {
        "items": [
          {
            "_links": {
              "self": {
                "href": "https://demo.akeneo.com/api/rest/v1/families/tshirt"
              }
            },
            "code": "tshirt",
            "attributes": [
              "sku",
              "name",
              "description",
              "price",
              "size",
              "color",
              "picture"
            ],
            "attribute_as_label": "name",
            "attribute_as_image": "picture",
            "attribute_requirements": {
              "ecommerce": [
                "sku",
                "name",
                "description",
                "price",
                "size",
                "color"
              ],
              "tablet": [
                "sku",
                "name",
                "description",
                "price"
              ]
            },
            "labels": {
              "en_US": "Tshirt",
              "fr_FR": "Tshirt"
            }
          },
          {
            "_links": {
              "self": {
                "href": "https://demo.akeneo.com/api/rest/v1/families/caps"
              }
            },
            "code": "caps",
            "attributes": [
              "sku",
              "name",
              "description",
              "price",
              "color",
              "picture"
            ],
            "attribute_as_label": "name",
            "attribute_as_image": "picture",
            "attribute_requirements": {
              "ecommerce": [
                "sku",
                "name",
                "description",
                "price",
                "color"
              ],
              "tablet": [
                "sku",
                "name",
                "description",
                "price"
              ]
            },
            "labels": {
              "en_US": "Caps",
              "fr_FR": "Casquettes"
            }
          }
        ]
      }
    }

Authentication required

Can be caused by a missing or expired token

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 401,
      "message": "Authentication is required"
    }

Access forbidden

The user does not have the permission to execute this request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 403,
      "message": "Access forbidden. You are not allowed to list categories."
    }

Not Acceptable

The `Accept` header is not `application/json` but it should

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 406,
      "message": "‘xxx’ in ‘Accept‘ header is not valid. Only ‘application/json‘ is allowed."
    }

Create a new family

This endpoint allows you to create a new family.

Available in PIM versions: 1.7 2.x 3.x 4.0 5.0 SaaS


REQUEST

post /api/rest/v1/families

Path parameters

Ø

Query parameters

Ø

Headers

Authorization • Equal to 'Bearer xxx', `xxx` being the authentication token, see Authentication section

Content-type • Equal to 'application/json', no other value allowed

Body

Follow the standard format of the entity

{

code (string ) • Family code

attribute_as_label (string ) • Attribute code used as label

attribute_as_image (string , null by default) • Attribute code used as the main picture in the user interface (only since v2.0)

attributes (array [string] , [] by default) • Attributes codes that compose the family

attribute_requirements (object { channelCode : array [ string ] } ) • Attributes codes of the family that are required for the completeness calculation for each channel

labels (object { localeCode : string } , [] by default) • Family labels for each locale

}

Example

{
      "code": "caps",
      "attributes": [
        "sku",
        "name",
        "description",
        "price",
        "color",
        "picture"
      ],
      "attribute_as_label": "name",
      "attribute_as_image": "picture",
      "attribute_requirements": {
        "ecommerce": [
          "sku",
          "name",
          "description",
          "price",
          "color"
        ],
        "tablet": [
          "sku",
          "name",
          "description",
          "price"
        ]
      },
      "labels": {
        "en_US": "Caps",
        "fr_FR": "Casquettes"
      }
    }

RESPONSES

Created

Means that the creation was successful

Headers

Location • URI of the created resource

Body Format application/json

Ø

Bad request

Can be caused by a malformed JSON request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 400,
      "message": "Invalid JSON message received"
    }

Authentication required

Can be caused by a missing or expired token

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 401,
      "message": "Authentication is required"
    }

Access forbidden

The user does not have the permission to execute this request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 403,
      "message": "Access forbidden. You are not allowed to list categories."
    }

Unsupported Media type

The `Content-type` header has to be `application/json`

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 415,
      "message": "‘xxx’ in ‘Content-type’ header is not valid.  Only ‘application/json’ is allowed."
    }

Unprocessable entity

The validation of the entity given in the body of the request failed

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 422,
      "message": "Property \"labels\" expects an array as data, \"NULL\" given. Check the API reference documentation.",
      "_links": {
        "documentation": {
          "href": "http://api.akeneo.com/api-reference.html"
        }
      }
    }

Update/create several families

This endpoint allows you to update and/or create several families at once.

Available in PIM versions: 1.7 2.x 3.x 4.0 5.0 SaaS


REQUEST

patch /api/rest/v1/families

Path parameters

Ø

Query parameters

Ø

Headers

Authorization • Equal to 'Bearer xxx', `xxx` being the authentication token, see Authentication section

Content-type • Equal to 'application/vnd.akeneo.collection+json', no other value allowed

Body

Contains several lines, each line is a family in JSON standard format

{

code (string ) • Family code

attribute_as_label (string ) • Attribute code used as label

attribute_as_image (string , null by default) • Attribute code used as the main picture in the user interface (only since v2.0)

attributes (array [string] , [] by default) • Attributes codes that compose the family

attribute_requirements (object { channelCode : array [ string ] } ) • Attributes codes of the family that are required for the completeness calculation for each channel

labels (object { localeCode : string } , [] by default) • Family labels for each locale

}

Example

{"code":"tshirt","attributes":["description","size"]}
    {"code":"cap","attribute_as_label":"descripion"}
    {"code":"mug","attributes":["description","short_description"]}

RESPONSES

OK

Returns a plain text response whose lines are JSON containing the status of each update or creation

Body Format application/json

{

line (integer ) • Line number

identifier (string ) • Resource identifier, only filled when the resource is a product

code (string ) • Resource code, only filled when the resource is not a product

status_code (integer ) • HTTP status code, see Client errors to understand the meaning of each code

message (string ) • Message explaining the error

}

Example

{"line":1,"code":"tshirt","status_code":201}
    {"line":2,"code":"cap","status_code":422,"message":"Attribute "descripion" does not exist."}
    {"line":3,"code":"mug","status_code":204}

Authentication required

Can be caused by a missing or expired token

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 401,
      "message": "Authentication is required"
    }

Access forbidden

The user does not have the permission to execute this request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 403,
      "message": "Access forbidden. You are not allowed to list categories."
    }

Request Entity Too Large

There are too many resources to process (max 100) or the line of JSON is too long (max 1 000 000 characters)

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 413,
      "message": "Too many resources to process, 100 is the maximum allowed."
    }

Unsupported Media type

The `Content-type` header has to be `application/vnd.akeneo.collection+json`

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 415,
      "message": "‘xxx’ in ‘Content-type’ header is not valid.  Only ‘application/vnd.akeneo.collection+json’ is allowed."
    }

Get a family

This endpoint allows you to get the information about a given family.

Available in PIM versions: 1.7 2.x 3.x 4.0 5.0 SaaS


REQUEST

get /api/rest/v1/families/{code}

Path parameters

code (string) • Code of the resource

Query parameters

Ø

Headers

Authorization • Equal to 'Bearer xxx', `xxx` being the authentication token, see Authentication section

Accept • Equal to 'application/json', no other value allowed

Body

Ø


RESPONSES

OK

Returns the content of the family in JSON standard format

Body Format application/json

Follow the standard format of the entity

{

code (string ) • Family code

attribute_as_label (string ) • Attribute code used as label

attribute_as_image (string ) • Attribute code used as the main picture in the user interface (only since v2.0)

attributes (array [string] ) • Attributes codes that compose the family

attribute_requirements (object ) : {
    channelCode (array [string] ) • Attributes codes of the family that are required for the completeness calculation for the channel `channelCode`
  }

labels (object ) : {
    localeCode (string ) • Family label for the locale `localeCode`
  }

}

Example

{
      "code": "caps",
      "attributes": [
        "sku",
        "name",
        "description",
        "price",
        "color",
        "picture"
      ],
      "attribute_as_label": "name",
      "attribute_as_image": "picture",
      "attribute_requirements": {
        "ecommerce": [
          "sku",
          "name",
          "description",
          "price",
          "color"
        ],
        "tablet": [
          "sku",
          "name",
          "description",
          "price"
        ]
      },
      "labels": {
        "en_US": "Caps",
        "fr_FR": "Casquettes"
      }
    }

Authentication required

Can be caused by a missing or expired token

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 401,
      "message": "Authentication is required"
    }

Access forbidden

The user does not have the permission to execute this request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 403,
      "message": "Access forbidden. You are not allowed to list categories."
    }

Resource not found

The resource code given in the URI does not correspond to any existing PIM resource

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 404,
      "message": "Resource `my_resource_code` does not exist."
    }

Not Acceptable

The `Accept` header is not `application/json` but it should

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 406,
      "message": "‘xxx’ in ‘Accept‘ header is not valid. Only ‘application/json‘ is allowed."
    }

Update/create a family

This endpoint allows you to update a given family. Know more about Update behavior. Note that if no family exists for the given code, it creates it.

Available in PIM versions: 1.7 2.x 3.x 4.0 5.0 SaaS


REQUEST

patch /api/rest/v1/families/{code}

Path parameters

code (string) • Code of the resource

Query parameters

Ø

Headers

Authorization • Equal to 'Bearer xxx', `xxx` being the authentication token, see Authentication section

Content-type • Equal to 'application/json', no other value allowed

Body

Follow the standard format of the entity

{

code (string ) • Family code

attribute_as_label (string ) • Attribute code used as label

attribute_as_image (string , null by default) • Attribute code used as the main picture in the user interface (only since v2.0)

attributes (array [string] , [] by default) • Attributes codes that compose the family

attribute_requirements (object { channelCode : array [ string ] } ) • Attributes codes of the family that are required for the completeness calculation for each channel

labels (object { localeCode : string } , [] by default) • Family labels for each locale

}

Example

{
      "code": "caps",
      "attributes": [
        "sku",
        "name",
        "description",
        "price",
        "color",
        "picture"
      ],
      "attribute_as_label": "name",
      "attribute_as_image": "picture",
      "attribute_requirements": {
        "ecommerce": [
          "sku",
          "name",
          "description",
          "price",
          "color"
        ],
        "tablet": [
          "sku",
          "name",
          "description",
          "price"
        ]
      },
      "labels": {
        "en_US": "Caps",
        "fr_FR": "Casquettes"
      }
    }

RESPONSES

Created

Means that the creation was successful

Headers

Location • URI of the created resource

Body Format application/json

Ø

No content to return

Means that the update was successful

Headers

Location • URI of the updated resource

Body Format application/json

Ø

Bad request

Can be caused by a malformed JSON request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 400,
      "message": "Invalid JSON message received"
    }

Authentication required

Can be caused by a missing or expired token

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 401,
      "message": "Authentication is required"
    }

Access forbidden

The user does not have the permission to execute this request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 403,
      "message": "Access forbidden. You are not allowed to list categories."
    }

Unsupported Media type

The `Content-type` header has to be `application/json`

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 415,
      "message": "‘xxx’ in ‘Content-type’ header is not valid.  Only ‘application/json’ is allowed."
    }

Unprocessable entity

The validation of the entity given in the body of the request failed

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 422,
      "message": "Property \"labels\" expects an array as data, \"NULL\" given. Check the API reference documentation.",
      "_links": {
        "documentation": {
          "href": "http://api.akeneo.com/api-reference.html"
        }
      }
    }

Attribute

Get list of attributes

This endpoint allows you to get a list of attributes. Attributes are paginated and sorted by code.

Available in PIM versions: 1.7 2.x 3.x 4.0 5.0 SaaS


REQUEST

get /api/rest/v1/attributes

Path parameters

Ø

Query parameters

search (string ) • Filter attributes, for more details see the Filters section.

page (integer , 1 by default ) • Number of the page to retrieve when using the `page` pagination method type. Should never be set manually, see Pagination section

limit (integer , 10 by default ) • Number of results by page, see Pagination section

with_count (boolean ) • Return the count of products in the response. Be carefull with that, on a big catalog, it can decrease performance in a significative way

Headers

Authorization • Equal to 'Bearer xxx', `xxx` being the authentication token, see Authentication section

Accept • Equal to 'application/json', no other value allowed

Body

Ø


RESPONSES

Return attributes paginated

Body Format application/json

Follow the standard format of the entity

{

_links (object) : {
    self (object ) : {
        href (string ) • URI of the current page of resources
    }
    first (object ) : {
        href (string ) • URI of the first page of resources
    }
    previous (object ) : {
        href (string ) • URI of the previous page of resources
    }
    next (object ) : {
        href (string ) • URI of the next page of resources
    }
  }

current_page (integer) • Current page number

_embedded (object) : {
    items (array ) : [
        {
          _links (object) : {
              self (object) : {
                  href (string ) • URI of the resource
              }
          }
          code (string) • Attribute code
          type (string) • Attribute type
          labels (object) : {
              localeCode (string) • Attribute label for the locale `localeCode`
          }
          group (string) • Attribute group
          group_labels (object) : {
              localeCode (string) • Group label for the locale `localeCode`
          }
          sort_order (integer) • Order of the attribute in its group
          localizable (boolean) • Whether the attribute is localizable, i.e. can have one value by locale
          scopable (boolean) • Whether the attribute is scopable, i.e. can have one value by channel
          available_locales (array [string ]) • To make the attribute locale specfic, specify here for which locales it is specific
          unique (boolean) • Whether two values for the attribute cannot be the same
          useable_as_grid_filter (boolean) • Whether the attribute can be used as a filter for the product grid in the PIM user interface
          max_characters (integer) • Number maximum of characters allowed for the value of the attribute when the attribute type is `pim_catalog_text`, `pim_catalog_textarea` or `pim_catalog_identifier`
          validation_rule (string) • Validation rule type used to validate any attribute value when the attribute type is `pim_catalog_text` or `pim_catalog_identifier`
          validation_regexp (string) • Regexp expression used to validate any attribute value when the attribute type is `pim_catalog_text` or `pim_catalog_identifier`
          wysiwyg_enabled (boolean) • Whether the WYSIWYG interface is shown when the attribute type is `pim_catalog_textarea`
          number_min (string) • Minimum integer value allowed when the attribute type is `pim_catalog_metric`, `pim_catalog_price` or `pim_catalog_number`
          number_max (string) • Maximum integer value allowed when the attribute type is `pim_catalog_metric`, `pim_catalog_price` or `pim_catalog_number`
          decimals_allowed (boolean) • Whether decimals are allowed when the attribute type is `pim_catalog_metric`, `pim_catalog_price` or `pim_catalog_number`
          negative_allowed (boolean) • Whether negative values are allowed when the attribute type is `pim_catalog_metric` or `pim_catalog_number`
          metric_family (string) • Metric family when the attribute type is `pim_catalog_metric`
          default_metric_unit (string) • Default metric unit when the attribute type is `pim_catalog_metric`
          date_min (string) • Minimum date allowed when the attribute type is `pim_catalog_date`
          date_max (string) • Maximum date allowed when the attribute type is `pim_catalog_date`
          allowed_extensions (array [string ]) • Extensions allowed when the attribute type is `pim_catalog_file` or `pim_catalog_image`
          max_file_size (string) • Max file size in MB when the attribute type is `pim_catalog_file` or `pim_catalog_image`
          reference_data_name (string) • Reference entity code when the attribute type is `akeneo_reference_entity` or `akeneo_reference_entity_collection` OR Asset family code when the attribute type is `pim_catalog_asset_collection`
          default_value (boolean) • Default value for a Yes/No attribute, applied when creating a new product or product model (only available since the 5.0)
        }
    ]
  }

}

Example

{
      "_links": {
        "self": {
          "href": "https://demo.akeneo.com/api/rest/v1/attributes?page=3&limit=2"
        },
        "first": {
          "href": "https://demo.akeneo.com/api/rest/v1/attributes?page=1&limit=2"
        },
        "previous": {
          "href": "https://demo.akeneo.com/api/rest/v1/attributes?page=2&limit=2"
        },
        "next": {
          "href": "https://demo.akeneo.com/api/rest/v1/attributes?page=4&limit=2"
        }
      },
      "current_page": 3,
      "_embedded": {
        "items": [
          {
            "_links": {
              "self": {
                "href": "https://demo.akeneo.com/api/rest/v1/attributes/sku"
              }
            },
            "code": "sku",
            "type": "pim_catalog_identifier",
            "group": "other",
            "group_labels": {
              "en_US": "Other",
              "fr_FR": "Autre"
            },
            "unique": true,
            "useable_as_grid_filter": true,
            "allowed_extensions": [],
            "metric_family": null,
            "default_metric_unit": null,
            "reference_data_name": null,
            "available_locales": [],
            "max_characters": null,
            "validation_rule": null,
            "validation_regexp": null,
            "wysiwyg_enabled": false,
            "number_min": null,
            "number_max": null,
            "decimals_allowed": false,
            "negative_allowed": false,
            "date_min": null,
            "date_max": null,
            "max_file_size": null,
            "minimum_input_length": null,
            "sort_order": 1,
            "localizable": false,
            "scopable": false,
            "default_value": null,
            "labels": {
              "en_US": "Identifier",
              "fr_FR": "Identifiant"
            }
          },
          {
            "_links": {
              "self": {
                "href": "https://demo.akeneo.com/api/rest/v1/attributes/release_date"
              }
            },
            "code": "release_date",
            "type": "pim_catalog_date",
            "group": "marketing",
            "unique": false,
            "useable_as_grid_filter": true,
            "allowed_extensions": [],
            "metric_family": null,
            "default_metric_unit": null,
            "reference_data_name": null,
            "available_locales": [],
            "max_characters": null,
            "validation_rule": null,
            "validation_regexp": null,
            "wysiwyg_enabled": false,
            "number_min": null,
            "number_max": null,
            "decimals_allowed": false,
            "negative_allowed": false,
            "date_min": "2017-06-28T08:00:00",
            "date_max": "2017-08-08T22:00:00",
            "max_file_size": null,
            "minimum_input_length": null,
            "sort_order": 1,
            "localizable": false,
            "scopable": false,
            "default_value": null,
            "labels": {
              "en_US": "Sale date",
              "fr_FR": "Date des soldes"
            }
          }
        ]
      }
    }

Authentication required

Can be caused by a missing or expired token

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 401,
      "message": "Authentication is required"
    }

Access forbidden

The user does not have the permission to execute this request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 403,
      "message": "Access forbidden. You are not allowed to list categories."
    }

Not Acceptable

The `Accept` header is not `application/json` but it should

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 406,
      "message": "‘xxx’ in ‘Accept‘ header is not valid. Only ‘application/json‘ is allowed."
    }

Create a new attribute

This endpoint allows you to create a new attribute.

Available in PIM versions: 1.7 2.x 3.x 4.0 5.0 SaaS


REQUEST

post /api/rest/v1/attributes

Path parameters

Ø

Query parameters

Ø

Headers

Authorization • Equal to 'Bearer xxx', `xxx` being the authentication token, see Authentication section

Content-type • Equal to 'application/json', no other value allowed

Body

Follow the standard format of the entity

{

code (string ) • Attribute code

type (string ) • Attribute type

labels (object { localeCode : string } , [] by default) • Attribute labels for each locale

group (string ) • Attribute group

sort_order (integer , 0 by default) • Order of the attribute in its group

localizable (boolean , false by default) • Whether the attribute is localizable, i.e. can have one value by locale

scopable (boolean , false by default) • Whether the attribute is scopable, i.e. can have one value by channel

available_locales (array [string] ) • To make the attribute locale specfic, specify here for which locales it is specific

unique (boolean ) • Whether two values for the attribute cannot be the same

useable_as_grid_filter (boolean ) • Whether the attribute can be used as a filter for the product grid in the PIM user interface

max_characters (integer ) • Number maximum of characters allowed for the value of the attribute when the attribute type is `pim_catalog_text`, `pim_catalog_textarea` or `pim_catalog_identifier`

validation_rule (string ) • Validation rule type used to validate any attribute value when the attribute type is `pim_catalog_text` or `pim_catalog_identifier`

validation_regexp (string ) • Regexp expression used to validate any attribute value when the attribute type is `pim_catalog_text` or `pim_catalog_identifier`

wysiwyg_enabled (boolean ) • Whether the WYSIWYG interface is shown when the attribute type is `pim_catalog_textarea`

number_min (string ) • Minimum integer value allowed when the attribute type is `pim_catalog_metric`, `pim_catalog_price` or `pim_catalog_number`

number_max (string ) • Maximum integer value allowed when the attribute type is `pim_catalog_metric`, `pim_catalog_price` or `pim_catalog_number`

decimals_allowed (boolean ) • Whether decimals are allowed when the attribute type is `pim_catalog_metric`, `pim_catalog_price` or `pim_catalog_number`

negative_allowed (boolean ) • Whether negative values are allowed when the attribute type is `pim_catalog_metric` or `pim_catalog_number`

metric_family (string ) • Metric family when the attribute type is `pim_catalog_metric`

default_metric_unit (string ) • Default metric unit when the attribute type is `pim_catalog_metric`

date_min (string ) • Minimum date allowed when the attribute type is `pim_catalog_date`

date_max (string ) • Maximum date allowed when the attribute type is `pim_catalog_date`

allowed_extensions (array [string] ) • Extensions allowed when the attribute type is `pim_catalog_file` or `pim_catalog_image`

max_file_size (string ) • Max file size in MB when the attribute type is `pim_catalog_file` or `pim_catalog_image`

reference_data_name (string ) • Reference entity code when the attribute type is `akeneo_reference_entity` or `akeneo_reference_entity_collection` OR Asset family code when the attribute type is `pim_catalog_asset_collection`

default_value (boolean ) • Default value for a Yes/No attribute, applied when creating a new product or product model (only available since the 5.0)

}

Example

{
      "code": "release_date",
      "type": "pim_catalog_date",
      "group": "marketing",
      "unique": false,
      "useable_as_grid_filter": true,
      "allowed_extensions": [],
      "metric_family": null,
      "default_metric_unit": null,
      "reference_data_name": null,
      "available_locales": [],
      "max_characters": null,
      "validation_rule": null,
      "validation_regexp": null,
      "wysiwyg_enabled": null,
      "number_min": null,
      "number_max": null,
      "decimals_allowed": null,
      "negative_allowed": null,
      "date_min": "2017-06-28T08:00:00",
      "date_max": "2017-08-08T22:00:00",
      "max_file_size": null,
      "minimum_input_length": null,
      "sort_order": 1,
      "localizable": false,
      "scopable": false,
      "default_value": null,
      "labels": {
        "en_US": "Sale date",
        "fr_FR": "Date des soldes"
      }
    }

RESPONSES

Created

Means that the creation was successful

Headers

Location • URI of the created resource

Body Format application/json

Ø

Bad request

Can be caused by a malformed JSON request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 400,
      "message": "Invalid JSON message received"
    }

Authentication required

Can be caused by a missing or expired token

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 401,
      "message": "Authentication is required"
    }

Access forbidden

The user does not have the permission to execute this request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 403,
      "message": "Access forbidden. You are not allowed to list categories."
    }

Unsupported Media type

The `Content-type` header has to be `application/json`

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 415,
      "message": "‘xxx’ in ‘Content-type’ header is not valid.  Only ‘application/json’ is allowed."
    }

Unprocessable entity

The validation of the entity given in the body of the request failed

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 422,
      "message": "Property \"labels\" expects an array as data, \"NULL\" given. Check the API reference documentation.",
      "_links": {
        "documentation": {
          "href": "http://api.akeneo.com/api-reference.html"
        }
      }
    }

Update/create several attributes

This endpoint allows you to update and/or create several attributes at once.

Available in PIM versions: 1.7 2.x 3.x 4.0 5.0 SaaS


REQUEST

patch /api/rest/v1/attributes

Path parameters

Ø

Query parameters

Ø

Headers

Authorization • Equal to 'Bearer xxx', `xxx` being the authentication token, see Authentication section

Content-type • Equal to 'application/vnd.akeneo.collection+json', no other value allowed

Body

Contains several lines, each line is an attribute in JSON standard format

{

code (string ) • Attribute code

type (string ) • Attribute type

labels (object { localeCode : string } , [] by default) • Attribute labels for each locale

group (string ) • Attribute group

group_labels (object { localeCode : string } , [] by default) • Group labels for each locale

sort_order (integer , 0 by default) • Order of the attribute in its group

localizable (boolean , false by default) • Whether the attribute is localizable, i.e. can have one value by locale

scopable (boolean , false by default) • Whether the attribute is scopable, i.e. can have one value by channel

available_locales (array [string] ) • To make the attribute locale specfic, specify here for which locales it is specific

unique (boolean ) • Whether two values for the attribute cannot be the same

useable_as_grid_filter (boolean ) • Whether the attribute can be used as a filter for the product grid in the PIM user interface

max_characters (integer ) • Number maximum of characters allowed for the value of the attribute when the attribute type is `pim_catalog_text`, `pim_catalog_textarea` or `pim_catalog_identifier`

validation_rule (string ) • Validation rule type used to validate any attribute value when the attribute type is `pim_catalog_text` or `pim_catalog_identifier`

validation_regexp (string ) • Regexp expression used to validate any attribute value when the attribute type is `pim_catalog_text` or `pim_catalog_identifier`

wysiwyg_enabled (boolean ) • Whether the WYSIWYG interface is shown when the attribute type is `pim_catalog_textarea`

number_min (string ) • Minimum integer value allowed when the attribute type is `pim_catalog_metric`, `pim_catalog_price` or `pim_catalog_number`

number_max (string ) • Maximum integer value allowed when the attribute type is `pim_catalog_metric`, `pim_catalog_price` or `pim_catalog_number`

decimals_allowed (boolean ) • Whether decimals are allowed when the attribute type is `pim_catalog_metric`, `pim_catalog_price` or `pim_catalog_number`

negative_allowed (boolean ) • Whether negative values are allowed when the attribute type is `pim_catalog_metric` or `pim_catalog_number`

metric_family (string ) • Metric family when the attribute type is `pim_catalog_metric`

default_metric_unit (string ) • Default metric unit when the attribute type is `pim_catalog_metric`

date_min (string ) • Minimum date allowed when the attribute type is `pim_catalog_date`

date_max (string ) • Maximum date allowed when the attribute type is `pim_catalog_date`

allowed_extensions (array [string] ) • Extensions allowed when the attribute type is `pim_catalog_file` or `pim_catalog_image`

max_file_size (string ) • Max file size in MB when the attribute type is `pim_catalog_file` or `pim_catalog_image`

reference_data_name (string ) • Reference entity code when the attribute type is `akeneo_reference_entity` or `akeneo_reference_entity_collection` OR Asset family code when the attribute type is `pim_catalog_asset_collection`

default_value (boolean ) • Default value for a Yes/No attribute, applied when creating a new product or product model (only available since the 5.0)

}

Example

{"code":"description","useable_as_grid_filter":true}
    {"code":"short_description","group":"marketig"}
    {"code":"release_date","date_min":"2017-06-28T08:00:00"}

RESPONSES

OK

Returns a plain text response whose lines are JSON containing the status of each update or creation

Body Format application/json

{

line (integer ) • Line number

identifier (string ) • Resource identifier, only filled when the resource is a product

code (string ) • Resource code, only filled when the resource is not a product

status_code (integer ) • HTTP status code, see Client errors to understand the meaning of each code

message (string ) • Message explaining the error

}

Example

{"line":1,"code":"description","status_code":201}
    {"line":2,"code":"short_description","status_code":422,"message":"Group "marketig" does not exist."}
    {"line":3,"code":"release_date","status_code":204}

Authentication required

Can be caused by a missing or expired token

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 401,
      "message": "Authentication is required"
    }

Access forbidden

The user does not have the permission to execute this request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 403,
      "message": "Access forbidden. You are not allowed to list categories."
    }

Request Entity Too Large

There are too many resources to process (max 100) or the line of JSON is too long (max 1 000 000 characters)

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 413,
      "message": "Too many resources to process, 100 is the maximum allowed."
    }

Unsupported Media type

The `Content-type` header has to be `application/vnd.akeneo.collection+json`

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 415,
      "message": "‘xxx’ in ‘Content-type’ header is not valid.  Only ‘application/vnd.akeneo.collection+json’ is allowed."
    }

Get an attribute

This endpoint allows you to get the information about a given attribute.

Available in PIM versions: 1.7 2.x 3.x 4.0 5.0 SaaS


REQUEST

get /api/rest/v1/attributes/{code}

Path parameters

code (string) • Code of the resource

Query parameters

Ø

Headers

Authorization • Equal to 'Bearer xxx', `xxx` being the authentication token, see Authentication section

Accept • Equal to 'application/json', no other value allowed

Body

Ø


RESPONSES

OK

Returns the content of the attribute in JSON standard format

Body Format application/json

Follow the standard format of the entity

{

code (string ) • Attribute code

type (string ) • Attribute type

labels (object ) : {
    localeCode (string ) • Attribute label for the locale `localeCode`
  }

group (string ) • Attribute group

group_labels (object ) : {
    localeCode (string ) • Group label for the locale `localeCode`
  }

sort_order (integer ) • Order of the attribute in its group

localizable (boolean ) • Whether the attribute is localizable, i.e. can have one value by locale

scopable (boolean ) • Whether the attribute is scopable, i.e. can have one value by channel

available_locales (array [string] ) • To make the attribute locale specfic, specify here for which locales it is specific

unique (boolean ) • Whether two values for the attribute cannot be the same

useable_as_grid_filter (boolean ) • Whether the attribute can be used as a filter for the product grid in the PIM user interface

max_characters (integer ) • Number maximum of characters allowed for the value of the attribute when the attribute type is `pim_catalog_text`, `pim_catalog_textarea` or `pim_catalog_identifier`

validation_rule (string ) • Validation rule type used to validate any attribute value when the attribute type is `pim_catalog_text` or `pim_catalog_identifier`

validation_regexp (string ) • Regexp expression used to validate any attribute value when the attribute type is `pim_catalog_text` or `pim_catalog_identifier`

wysiwyg_enabled (boolean ) • Whether the WYSIWYG interface is shown when the attribute type is `pim_catalog_textarea`

number_min (string ) • Minimum integer value allowed when the attribute type is `pim_catalog_metric`, `pim_catalog_price` or `pim_catalog_number`

number_max (string ) • Maximum integer value allowed when the attribute type is `pim_catalog_metric`, `pim_catalog_price` or `pim_catalog_number`

decimals_allowed (boolean ) • Whether decimals are allowed when the attribute type is `pim_catalog_metric`, `pim_catalog_price` or `pim_catalog_number`

negative_allowed (boolean ) • Whether negative values are allowed when the attribute type is `pim_catalog_metric` or `pim_catalog_number`

metric_family (string ) • Metric family when the attribute type is `pim_catalog_metric`

default_metric_unit (string ) • Default metric unit when the attribute type is `pim_catalog_metric`

date_min (string ) • Minimum date allowed when the attribute type is `pim_catalog_date`

date_max (string ) • Maximum date allowed when the attribute type is `pim_catalog_date`

allowed_extensions (array [string] ) • Extensions allowed when the attribute type is `pim_catalog_file` or `pim_catalog_image`

max_file_size (string ) • Max file size in MB when the attribute type is `pim_catalog_file` or `pim_catalog_image`

reference_data_name (string ) • Reference entity code when the attribute type is `akeneo_reference_entity` or `akeneo_reference_entity_collection` OR Asset family code when the attribute type is `pim_catalog_asset_collection`

default_value (boolean ) • Default value for a Yes/No attribute, applied when creating a new product or product model (only available since the 5.0)

}

Example

{
      "code": "release_date",
      "type": "pim_catalog_date",
      "group": "marketing",
      "group_labels": {
        "en_US": "Marketing",
        "fr_FR": "Marketing"
      },
      "unique": false,
      "useable_as_grid_filter": true,
      "allowed_extensions": [],
      "metric_family": null,
      "default_metric_unit": null,
      "reference_data_name": null,
      "available_locales": [],
      "max_characters": null,
      "validation_rule": null,
      "validation_regexp": null,
      "wysiwyg_enabled": null,
      "number_min": null,
      "number_max": null,
      "decimals_allowed": null,
      "negative_allowed": null,
      "date_min": "2017-06-28T08:00:00",
      "date_max": "2017-08-08T22:00:00",
      "max_file_size": null,
      "minimum_input_length": null,
      "sort_order": 1,
      "localizable": false,
      "scopable": false,
      "default_value": null,
      "labels": {
        "en_US": "Sale date",
        "fr_FR": "Date des soldes"
      }
    }

Authentication required

Can be caused by a missing or expired token

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 401,
      "message": "Authentication is required"
    }

Access forbidden

The user does not have the permission to execute this request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 403,
      "message": "Access forbidden. You are not allowed to list categories."
    }

Resource not found

The resource code given in the URI does not correspond to any existing PIM resource

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 404,
      "message": "Resource `my_resource_code` does not exist."
    }

Not Acceptable

The `Accept` header is not `application/json` but it should

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 406,
      "message": "‘xxx’ in ‘Accept‘ header is not valid. Only ‘application/json‘ is allowed."
    }

Update/create an attribute

This endpoint allows you to update a given attribute. Know more about Update behavior. Note that if no attribute exists for the given code, it creates it.

Available in PIM versions: 1.7 2.x 3.x 4.0 5.0 SaaS


REQUEST

patch /api/rest/v1/attributes/{code}

Path parameters

code (string) • Code of the resource

Query parameters

Ø

Headers

Authorization • Equal to 'Bearer xxx', `xxx` being the authentication token, see Authentication section

Content-type • Equal to 'application/json', no other value allowed

Body

Follow the standard format of the entity

{

code (string ) • Attribute code

type (string ) • Attribute type

labels (object { localeCode : string } , [] by default) • Attribute labels for each locale

group (string ) • Attribute group

group_labels (object { localeCode : string } , [] by default) • Group labels for each locale

sort_order (integer , 0 by default) • Order of the attribute in its group

localizable (boolean , false by default) • Whether the attribute is localizable, i.e. can have one value by locale

scopable (boolean , false by default) • Whether the attribute is scopable, i.e. can have one value by channel

available_locales (array [string] ) • To make the attribute locale specfic, specify here for which locales it is specific

unique (boolean ) • Whether two values for the attribute cannot be the same

useable_as_grid_filter (boolean ) • Whether the attribute can be used as a filter for the product grid in the PIM user interface

max_characters (integer ) • Number maximum of characters allowed for the value of the attribute when the attribute type is `pim_catalog_text`, `pim_catalog_textarea` or `pim_catalog_identifier`

validation_rule (string ) • Validation rule type used to validate any attribute value when the attribute type is `pim_catalog_text` or `pim_catalog_identifier`

validation_regexp (string ) • Regexp expression used to validate any attribute value when the attribute type is `pim_catalog_text` or `pim_catalog_identifier`

wysiwyg_enabled (boolean ) • Whether the WYSIWYG interface is shown when the attribute type is `pim_catalog_textarea`

number_min (string ) • Minimum integer value allowed when the attribute type is `pim_catalog_metric`, `pim_catalog_price` or `pim_catalog_number`

number_max (string ) • Maximum integer value allowed when the attribute type is `pim_catalog_metric`, `pim_catalog_price` or `pim_catalog_number`

decimals_allowed (boolean ) • Whether decimals are allowed when the attribute type is `pim_catalog_metric`, `pim_catalog_price` or `pim_catalog_number`

negative_allowed (boolean ) • Whether negative values are allowed when the attribute type is `pim_catalog_metric` or `pim_catalog_number`

metric_family (string ) • Metric family when the attribute type is `pim_catalog_metric`

default_metric_unit (string ) • Default metric unit when the attribute type is `pim_catalog_metric`

date_min (string ) • Minimum date allowed when the attribute type is `pim_catalog_date`

date_max (string ) • Maximum date allowed when the attribute type is `pim_catalog_date`

allowed_extensions (array [string] ) • Extensions allowed when the attribute type is `pim_catalog_file` or `pim_catalog_image`

max_file_size (string ) • Max file size in MB when the attribute type is `pim_catalog_file` or `pim_catalog_image`

reference_data_name (string ) • Reference entity code when the attribute type is `akeneo_reference_entity` or `akeneo_reference_entity_collection` OR Asset family code when the attribute type is `pim_catalog_asset_collection`

default_value (boolean ) • Default value for a Yes/No attribute, applied when creating a new product or product model (only available since the 5.0)

}

Example

{
      "code": "release_date",
      "type": "pim_catalog_date",
      "group": "marketing",
      "group_labels": {
        "en_US": "Marketing",
        "fr_FR": "Marketing"
      },
      "unique": false,
      "useable_as_grid_filter": true,
      "allowed_extensions": [],
      "metric_family": null,
      "default_metric_unit": null,
      "reference_data_name": null,
      "available_locales": [],
      "max_characters": null,
      "validation_rule": null,
      "validation_regexp": null,
      "wysiwyg_enabled": null,
      "number_min": null,
      "number_max": null,
      "decimals_allowed": null,
      "negative_allowed": null,
      "date_min": "2017-06-28T08:00:00",
      "date_max": "2017-08-08T22:00:00",
      "max_file_size": null,
      "minimum_input_length": null,
      "sort_order": 1,
      "localizable": false,
      "scopable": false,
      "default_value": null,
      "labels": {
        "en_US": "Sale date",
        "fr_FR": "Date des soldes"
      }
    }

RESPONSES

Created

Means that the creation was successful

Headers

Location • URI of the created resource

Body Format application/json

Ø

No content to return

Means that the update was successful

Headers

Location • URI of the updated resource

Body Format application/json

Ø

Bad request

Can be caused by a malformed JSON request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 400,
      "message": "Invalid JSON message received"
    }

Authentication required

Can be caused by a missing or expired token

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 401,
      "message": "Authentication is required"
    }

Access forbidden

The user does not have the permission to execute this request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 403,
      "message": "Access forbidden. You are not allowed to list categories."
    }

Unsupported Media type

The `Content-type` header has to be `application/json`

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 415,
      "message": "‘xxx’ in ‘Content-type’ header is not valid.  Only ‘application/json’ is allowed."
    }

Unprocessable entity

The validation of the entity given in the body of the request failed

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 422,
      "message": "Property \"labels\" expects an array as data, \"NULL\" given. Check the API reference documentation.",
      "_links": {
        "documentation": {
          "href": "http://api.akeneo.com/api-reference.html"
        }
      }
    }

Attribute option

Get list of attribute options

This endpoint allows you to get a list of attribute options. Attribute options are paginated and sorted by code.

Available in PIM versions: 1.7 2.x 3.x 4.0 5.0 SaaS


REQUEST

get /api/rest/v1/attributes/{attribute_code}/options

Path parameters

attribute_code (string) • Code of the attribute

Query parameters

page (integer , 1 by default ) • Number of the page to retrieve when using the `page` pagination method type. Should never be set manually, see Pagination section

limit (integer , 10 by default ) • Number of results by page, see Pagination section

with_count (boolean ) • Return the count of products in the response. Be carefull with that, on a big catalog, it can decrease performance in a significative way

Headers

Authorization • Equal to 'Bearer xxx', `xxx` being the authentication token, see Authentication section

Accept • Equal to 'application/json', no other value allowed

Body

Ø


RESPONSES

Return attribute options paginated

Body Format application/json

Follow the standard format of the entity

{

_links (object) : {
    self (object ) : {
        href (string ) • URI of the current page of resources
    }
    first (object ) : {
        href (string ) • URI of the first page of resources
    }
    previous (object ) : {
        href (string ) • URI of the previous page of resources
    }
    next (object ) : {
        href (string ) • URI of the next page of resources
    }
  }

current_page (integer) • Current page number

_embedded (object) : {
    items (array ) : [
        {
          _links (object) : {
              self (object) : {
                  href (string ) • URI of the resource
              }
          }
          code (string) • Code of option
          attribute (string) • Code of attribute related to the attribute option
          sort_order (integer) • Order of attribute option
          labels (object) : {
              localeCode (string) • Attribute option label for the locale `localeCode`
          }
        }
    ]
  }

}

Example

{
      "_links": {
        "self": {
          "href": "https://demo.akeneo.com/api/rest/v1/attributes/color/options?page=3&limit=3"
        },
        "first": {
          "href": "https://demo.akeneo.com/api/rest/v1/attributes/color/options?page=1&limit=3"
        },
        "previous": {
          "href": "https://demo.akeneo.com/api/rest/v1/attributes/color/options?page=2&limit=3"
        },
        "next": {
          "href": "https://demo.akeneo.com/api/rest/v1/attributes/color/options?page=4&limit=3"
        }
      },
      "current_page": 3,
      "_embedded": {
        "items": [
          {
            "_links": {
              "self": {
                "href": "https://demo.akeneo.com/api/rest/v1/attributes/color/options/red"
              }
            },
            "code": "red",
            "attribute": "a_simple_select",
            "sort_order": 1,
            "labels": {
              "en_US": "Red",
              "fr_FR": "Rouge"
            }
          },
          {
            "_links": {
              "self": {
                "href": "https://demo.akeneo.com/api/rest/v1/attributes/color/options/black"
              }
            },
            "code": "black",
            "attribute": "a_simple_select",
            "sort_order": 2,
            "labels": {
              "en_US": "Black",
              "fr_FR": "Noir"
            }
          },
          {
            "_links": {
              "self": {
                "href": "https://demo.akeneo.com/api/rest/v1/attributes/color/options/purple"
              }
            },
            "code": "purple",
            "attribute": "a_simple_select",
            "sort_order": 3,
            "labels": {
              "en_US": "Purple",
              "fr_FR": "Violet"
            }
          }
        ]
      }
    }

Authentication required

Can be caused by a missing or expired token

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 401,
      "message": "Authentication is required"
    }

Access forbidden

The user does not have the permission to execute this request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 403,
      "message": "Access forbidden. You are not allowed to list categories."
    }

Not Acceptable

The `Accept` header is not `application/json` but it should

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 406,
      "message": "‘xxx’ in ‘Accept‘ header is not valid. Only ‘application/json‘ is allowed."
    }

Create a new attribute option

This endpoint allows you to create a new attribute option.

Available in PIM versions: 1.7 2.x 3.x 4.0 5.0 SaaS


REQUEST

post /api/rest/v1/attributes/{attribute_code}/options

Path parameters

attribute_code (string) • Code of the attribute

Query parameters

Ø

Headers

Authorization • Equal to 'Bearer xxx', `xxx` being the authentication token, see Authentication section

Content-type • Equal to 'application/json', no other value allowed

Body

Follow the standard format of the entity

{

code (string ) • Code of option

attribute (string ) • Code of attribute related to the attribute option

sort_order (integer ) • Order of attribute option

labels (object { localeCode : string } , [] by default) • Attribute option labels for each locale

}

Example

{
      "code": "black",
      "attribute": "a_simple_select",
      "sort_order": 2,
      "labels": {
        "en_US": "Black",
        "fr_FR": "Noir"
      }
    }

RESPONSES

Created

Means that the creation was successful

Headers

Location • URI of the created resource

Body Format application/json

Ø

Bad request

Can be caused by a malformed JSON request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 400,
      "message": "Invalid JSON message received"
    }

Authentication required

Can be caused by a missing or expired token

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 401,
      "message": "Authentication is required"
    }

Access forbidden

The user does not have the permission to execute this request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 403,
      "message": "Access forbidden. You are not allowed to list categories."
    }

Unsupported Media type

The `Content-type` header has to be `application/json`

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 415,
      "message": "‘xxx’ in ‘Content-type’ header is not valid.  Only ‘application/json’ is allowed."
    }

Unprocessable entity

The validation of the entity given in the body of the request failed

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 422,
      "message": "Property \"labels\" expects an array as data, \"NULL\" given. Check the API reference documentation.",
      "_links": {
        "documentation": {
          "href": "http://api.akeneo.com/api-reference.html"
        }
      }
    }

Get an attribute option

This endpoint allows you to get the information about a given attribute option.

Available in PIM versions: 1.7 2.x 3.x 4.0 5.0 SaaS


REQUEST

get /api/rest/v1/attributes/{attribute_code}/options/{code}

Path parameters

attribute_code (string) • Code of the attribute

code (string) • Code of the resource

Query parameters

Ø

Headers

Authorization • Equal to 'Bearer xxx', `xxx` being the authentication token, see Authentication section

Accept • Equal to 'application/json', no other value allowed

Body

Ø


RESPONSES

OK

Returns the content of the attribute option in JSON standard format

Body Format application/json

Follow the standard format of the entity

{

code (string ) • Code of option

attribute (string ) • Code of attribute related to the attribute option

sort_order (integer ) • Order of attribute option

labels (object ) : {
    localeCode (string ) • Attribute option label for the locale `localeCode`
  }

}

Example

{
      "code": "black",
      "attribute": "a_simple_select",
      "sort_order": 2,
      "labels": {
        "en_US": "Black",
        "fr_FR": "Noir"
      }
    }

Authentication required

Can be caused by a missing or expired token

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 401,
      "message": "Authentication is required"
    }

Access forbidden

The user does not have the permission to execute this request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 403,
      "message": "Access forbidden. You are not allowed to list categories."
    }

Resource not found

The resource code given in the URI does not correspond to any existing PIM resource

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 404,
      "message": "Resource `my_resource_code` does not exist."
    }

Not Acceptable

The `Accept` header is not `application/json` but it should

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 406,
      "message": "‘xxx’ in ‘Accept‘ header is not valid. Only ‘application/json‘ is allowed."
    }

Update/create an attribute option

This endpoint allows you to update a given attribute option. Know more about Update behavior. Note that if no attribute option exists for the given code, it creates it.

Available in PIM versions: 1.7 2.x 3.x 4.0 5.0 SaaS


REQUEST

patch /api/rest/v1/attributes/{attribute_code}/options/{code}

Path parameters

attribute_code (string) • Code of the attribute

code (string) • Code of the resource

Query parameters

Ø

Headers

Authorization • Equal to 'Bearer xxx', `xxx` being the authentication token, see Authentication section

Content-type • Equal to 'application/json', no other value allowed

Body

Follow the standard format of the entity

{

code (string ) • Code of option

attribute (string ) • Code of attribute related to the attribute option

sort_order (integer ) • Order of attribute option

labels (object { localeCode : string } , [] by default) • Attribute option labels for each locale

}

Example

{
      "code": "black",
      "attribute": "a_simple_select",
      "sort_order": 2,
      "labels": {
        "en_US": "Black",
        "fr_FR": "Noir"
      }
    }

RESPONSES

Created

Means that the creation was successful

Headers

Location • URI of the created resource

Body Format application/json

Ø

No content to return

Means that the update was successful

Headers

Location • URI of the updated resource

Body Format application/json

Ø

Bad request

Can be caused by a malformed JSON request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 400,
      "message": "Invalid JSON message received"
    }

Authentication required

Can be caused by a missing or expired token

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 401,
      "message": "Authentication is required"
    }

Access forbidden

The user does not have the permission to execute this request

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 403,
      "message": "Access forbidden. You are not allowed to list categories."
    }

Unsupported Media type

The `Content-type` header has to be `application/json`

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 415,
      "message": "‘xxx’ in ‘Content-type’ header is not valid.  Only ‘application/json’ is allowed."
    }

Unprocessable entity

The validation of the entity given in the body of the request failed

Body Format application/json

{

code (integer ) • HTTP status code

message (string ) • Message explaining the error

}

Example

{
      "code": 422,
      "message": "Property \"labels\" expects an array as data, \"NULL\" given. Check the API reference documentation.",
      "_links": {
        "documentation": {
          "href": "http://api.akeneo.com/api-reference.html"
        }
      }
    }

Category

Get list of categories

This endpoint allows you to get a list of categories. Categories are paginated and sorted by `root/left`.

Available in PIM versions: 1.7 2.x 3.x 4.0 5.0 SaaS


REQUEST

get /api/rest/v1/categories

Path parameters

Ø

Query parameters

search (string ) • Filter categories, for more details see the Filters section.

page (integer , 1 by default ) • Number of the page to retrieve when using the `page` pagination method type. Should never be set manually, see Pagination section

limit (integer , 10 by default ) • Number of results by page, see Pagination section

with_count (boolean ) • Return the count of products in the response. Be carefull with that, on a big catalog, it can decrease performance in a significative way

Headers

Authorization • Equal to 'Bearer xxx', `xxx` being the authentication token, see Authentication section

Accept • Equal to 'application/json', no other value allowed

Body

Ø


RESPONSES

Return categories paginated

Body Format application/json

Follow the standard format of the entity

{

_links (object) : {
    self (object ) : {
        href (string ) • URI of the current page of resources
    }
    first (object ) : {
        href (string ) • URI of the first page of resources
    }
    previous (object ) : {
        href (string ) • URI of the previous page of resources
    }