Events API reference Deprecated

Complete reference on how to use Akeneo PIM events

#Product models

#Product model created

#Format

A product model created event follows this format:

{

  • events (array[object]) : [
    • {
        • action (string) • Event type
        • event_id (string) • Unique event identifier
        • event_datetime (string) • Event datetime
        • author (string) • Author of the event
        • author_type (string) • Type of the author "ui" or "api"
        • pim_source (string) • URL of the PIM that sends the event
        • data (object) : {
          • resource (object) : {
            • code (string) • Product model code
            • enabled (boolean) • Whether the product model is enable
            • family (string) • Family code from which the product model inherits its attributes and attribute requirements
            • family_variant (string) • Family variant code from which the product model inherits its attributes and attribute requirements
            • parent (string) • Code of the parent product model when this a level two product model
            • categories (array[string]) • Codes of the categories in which the product model is classified
            • values (object) : {
              • attributeCode (array[object]) : [
                • {
                    • scope (string) • Channel code of the product model value
                    • locale (string) • Locale code of the product model value
                    • data (object) • Product model value
                  • }
                  ]
                }
              • associations (object) : {
                • associationTypeCode (object) : {
                  • groups (array[string]) • Array of group codes with which the product model is in relation
                  • products (array[string]) • Array of product identifiers with which the product model is in relation
                  • product_models (array[string]) • Array of product model codes with which the product model is in relation.
                  }
                }
              • quantified_associations (object) : {
                • quantifiedAssociationTypeCode (object) : {
                  • products (array[object]) • Array of objects containing product identifiers and quantities with which the product model is in relation : [
                    • {
                        • identifier (string)
                        • quantity (integer)
                      • }
                      ]
                    • product_models (array[object]) • Array of objects containing product model codes and quantities with which the product model is in relation : [
                      • {
                          • code (string)
                          • quantity (integer)
                        • }
                        ]
                      }
                    }
                  • created (string) • Product creation date
                  • updated (string) • Date of the last product update
                  • metadata (object) • More information around the product model (only available in the Enterprise Edition) : {
                    • workflow_status (string) • Status of the product model regarding the user permissions (only available in the Enterprise Edition)
                    }
                  }
                }
            • }
            ]

          }

          #Example

          {
                  "events": [
                      {
                          "action": "product_model.created",
                          "event_id": "c306e088-fb76-479c-bbc0-18fef19da75d",
                          "event_datetime": "2020-10-20T09:13:59+00:00",
                          "author": "erp",
                          "author_type": "api",
                          "pim_source": "https://demo.akeneo.com",
                          "data": {
                              "resource": {
                                  "code": "sunglasses",
                                  "family": "accessories",
                                  "family_variant": "accessories_colorsize",
                                  "parent": null,
                                  "categories": [
                                      "master_accessories_sunglasses",
                                      "supplier_zaro"
                                  ],
                                  "enabled": true,
                                  "values": {
                                      "collection": [
                                          {
                                              "locale": null,
                                              "scope": null,
                                              "data": [
                                                  "winter_2020"
                                              ]
                                          }
                                      ],
                                      "image": [
                                          {
                                              "locale": null,
                                              "scope": null,
                                              "data": "9/9/c/c/99cc83f105199c667505cfa8ec1458c8be4f0814_sunglasses.jpg",
                                              "_links": {
                                                  "download": {
                                                      "href": "http://demo.akeneo.com/api/rest/v1/media-files/9/9/c/c/99cc83f105199c667505cfa8ec1458c8be4f0814_sunglasses.jpg/download"
                                                  }
                                              }
                                          }
                                      ],
                                      "ean": [
                                          {
                                              "locale": null,
                                              "scope": null,
                                              "data": "1234567890316"
                                          }
                                      ],
                                      "name": [
                                          {
                                              "locale": null,
                                              "scope": null,
                                              "data": "Sunglasses"
                                          }
                                      ],
                                      "weight": [
                                          {
                                              "locale": null,
                                              "scope": null,
                                              "data": {
                                                  "amount": "800.0000",
                                                  "unit": "GRAM"
                                              }
                                          }
                                      ],
                                      "description": [
                                          {
                                              "locale": "en_US",
                                              "scope": "ecommerce",
                                              "data": "<p>Brown and gold sunglasses</p>"
                                          }
                                      ]
                                  },
                                  "created": "2020-10-20T08:30:28+00:00",
                                  "updated": "2020-10-20T08:30:28+00:00",
                                  "associations": {
                                      "PACK": {
                                          "groups": [],
                                          "products": [],
                                          "product_models": []
                                      },
                                      "SUBSTITUTION": {
                                          "groups": [],
                                          "products": [],
                                          "product_models": []
                                      },
                                      "UPSELL": {
                                          "groups": [],
                                          "products": [],
                                          "product_models": []
                                      },
                                      "X_SELL": {
                                          "groups": [],
                                          "products": [],
                                          "product_models": []
                                      }
                                  },
                                  "quantified_associations": [],
                                  "metadata": {
                                      "workflow_status": "working_copy"
                                  }
                              }
                          }
                      }
                  ]
              }
              

          #Product model updated

          #Format

          A product model updated event follows this format:

          {

          • events (array[object]) : [
            • {
                • action (string) • Event type
                • event_id (string) • Unique event identifier
                • event_datetime (string) • Event datetime
                • author (string) • Author of the event
                • author_type (string) • Type of the author "ui" or "api"
                • pim_source (string) • URL of the PIM that sends the event
                • data (object) : {
                  • resource (object) : {
                    • code (string) • Product model code
                    • enabled (boolean) • Whether the product model is enable
                    • family (string) • Family code from which the product model inherits its attributes and attribute requirements
                    • family_variant (string) • Family variant code from which the product model inherits its attributes and attribute requirements
                    • parent (string) • Code of the parent product model when this a level two product model
                    • categories (array[string]) • Codes of the categories in which the product model is classified
                    • values (object) : {
                      • attributeCode (array[object]) : [
                        • {
                            • scope (string) • Channel code of the product model value
                            • locale (string) • Locale code of the product model value
                            • data (object) • Product model value
                          • }
                          ]
                        }
                      • associations (object) : {
                        • associationTypeCode (object) : {
                          • groups (array[string]) • Array of group codes with which the product model is in relation
                          • products (array[string]) • Array of product identifiers with which the product model is in relation
                          • product_models (array[string]) • Array of product model codes with which the product model is in relation.
                          }
                        }
                      • quantified_associations (object) : {
                        • quantifiedAssociationTypeCode (object) : {
                          • products (array[object]) • Array of objects containing product identifiers and quantities with which the product model is in relation : [
                            • {
                                • identifier (string)
                                • quantity (integer)
                              • }
                              ]
                            • product_models (array[object]) • Array of objects containing product model codes and quantities with which the product model is in relation : [
                              • {
                                  • code (string)
                                  • quantity (integer)
                                • }
                                ]
                              }
                            }
                          • created (string) • Product creation date
                          • updated (string) • Date of the last product update
                          • metadata (object) • More information around the product model (only available in the Enterprise Edition) : {
                            • workflow_status (string) • Status of the product model regarding the user permissions (only available in the Enterprise Edition)
                            }
                          }
                        }
                    • }
                    ]

                  }

                  #Example

                  {
                          "events": [
                              {
                                  "action": "product_model.updated",
                                  "event_id": "c306e088-fb76-479c-bbc0-18fef19da75d",
                                  "event_datetime": "2020-10-20T09:13:59+00:00",
                                  "author": "peter",
                                  "author_type": "ui",
                                  "pim_source": "https://demo.akeneo.com",
                                  "data": {
                                      "resource": {
                                          "code": "sunglasses",
                                          "family": "accessories",
                                          "family_variant": "accessories_colorsize",
                                          "parent": null,
                                          "categories": [
                                              "master_accessories_sunglasses",
                                              "supplier_zaro"
                                          ],
                                          "enabled": true,
                                          "values": {
                                              "collection": [
                                                  {
                                                      "locale": null,
                                                      "scope": null,
                                                      "data": [
                                                          "winter_2020"
                                                      ]
                                                  }
                                              ],
                                              "image": [
                                                  {
                                                      "locale": null,
                                                      "scope": null,
                                                      "data": "9/9/c/c/99cc83f105199c667505cfa8ec1458c8be4f0814_sunglasses.jpg",
                                                      "_links": {
                                                          "download": {
                                                              "href": "http://demo.akeneo.com/api/rest/v1/media-files/9/9/c/c/99cc83f105199c667505cfa8ec1458c8be4f0814_sunglasses.jpg/download"
                                                          }
                                                      }
                                                  }
                                              ],
                                              "ean": [
                                                  {
                                                      "locale": null,
                                                      "scope": null,
                                                      "data": "1234567890316"
                                                  }
                                              ],
                                              "name": [
                                                  {
                                                      "locale": null,
                                                      "scope": null,
                                                      "data": "Sunglasses"
                                                  }
                                              ],
                                              "weight": [
                                                  {
                                                      "locale": null,
                                                      "scope": null,
                                                      "data": {
                                                          "amount": "800.0000",
                                                          "unit": "GRAM"
                                                      }
                                                  }
                                              ],
                                              "description": [
                                                  {
                                                      "locale": "en_US",
                                                      "scope": "ecommerce",
                                                      "data": "<p>Brown and gold sunglasses</p>"
                                                  }
                                              ]
                                          },
                                          "created": "2020-10-20T08:30:28+00:00",
                                          "updated": "2020-10-20T09:13:59+00:00",
                                          "associations": {
                                              "PACK": {
                                                  "groups": [],
                                                  "products": [],
                                                  "product_models": []
                                              },
                                              "SUBSTITUTION": {
                                                  "groups": [],
                                                  "products": [],
                                                  "product_models": []
                                              },
                                              "UPSELL": {
                                                  "groups": [],
                                                  "products": [],
                                                  "product_models": []
                                              },
                                              "X_SELL": {
                                                  "groups": [],
                                                  "products": [],
                                                  "product_models": []
                                              }
                                          },
                                          "quantified_associations": [],
                                          "metadata": {
                                              "workflow_status": "working_copy"
                                          }
                                      }
                                  }
                              }
                          ]
                      }
                      

                  #Product model removed

                  #Format

                  A product model removed event follows this format:

                  {

                  • events (array[object]) : [
                    • {
                        • resource (object) : {
                          • action (string) • Event type
                          • event_id (string) • Unique event identifier
                          • event_datetime (string) • Event datetime
                          • author (string) • Author of the event
                          • author_type (string) • Type of the author "ui" or "api"
                          • pim_source (string) • URL of the PIM that sends the event
                          • data (object) : {
                            • code (string) • Product model code
                            }
                          }
                      • }
                      ]

                    }

                    #Example

                    {
                            "events": [
                                {
                                    "action": "product_model.removed",
                                    "event_id": "c306e088-fb76-479c-bbc0-18fef19da75d",
                                    "event_datetime": "2020-10-20T09:13:59+00:00",
                                    "author": "peter",
                                    "author_type": "ui",
                                    "pim_source": "https://demo.akeneo.com",
                                    "data": {
                                        "resource": {
                                            "code": "sunglasses"
                                        }
                                    }
                                }
                            ]
                        }