Skip to content

Product Webhook Notification (v2) ​

Webhook Version

This page documents Webhook v2 product updates. For the previous version, see Product Updates v1.

The Product Webhook Notification from MyLION keeps you informed about changes to product attributes, templates, and inventory levels. Below, you'll find comprehensive details about the payload structure and how to set up your receiving endpoint.

What's New in v2 ​

  • productTree replaces topLevelProducts / childProducts — products are now delivered as a tree of parent + variants.
  • categoryTree replaces categories — categories are now delivered as a recursive hierarchy.
  • independentAttributes added — standalone attributes not belonging to any template.
  • supplierType added at the top level.
  • New product fields: measureWarehouse, manufacturingQuantity, externalTemplateId, images, commodityCode, countryOfOrigin.
  • New per-language measureWarehouse inside descriptions.
  • AttributeValue enriched with attributeExternalId, type, label, labelTranslations, position, variation, valueExternalId.
  • AttributeDTO (templates & independentAttributes) enriched with externalId.

Payload Structure ​

json
{
  "supplierType": "MACMA", 
  "productTree": [ 
    {
      "product": { 
        "id": { 
          "myLionId": 123, 
          "externalId": "EXT_PROD_123"
        },
        "type": "variable", 
        "isService": false, 
        "parentId": null,
        "code": "PROD123", 
        "parentCode": null,
        "codeManufacturer": "MANU123",
        "brand": "Adidas",
        "taxClass": "27%", 
        "barCode": "123456789",
        "measureWarehouse": {
          "name": "Piece",
          "shortName": "pcs",
          "isoCode": "C62"
        },
        "weight": { "value": 1.5, "measure": "kg" },
        "netWeight": { "value": 1.2, "measure": "kg" },
        "sizeX": { "value": 10.0, "measure": "cm" },
        "sizeY": { "value": 15.0, "measure": "cm" },
        "sizeZ": { "value": 5.0, "measure": "cm" },
        "diameter": { "value": 5.0, "measure": "cm" },
        "descriptions": [ 
          {
            "language": "en", 
            "name": "Product Name", 
            "longDescription": "Long description.",
            "shortDescription": "Short description.",
            "searchKeywords": "keyword1, keyword2",
            "measureWarehouse": {
              "name": "Piece",
              "shortName": "pcs",
              "isoCode": "C62"
            }
          }
        ],
        "manufacturingQuantity": 5.0,
        "price": {
          "salesPrice": {
            "price": 50.0, 
            "dateFrom": null,
            "dateTo": null,
            "scales": [{ "minimumQuantity": 5, "price": 45.0 }]
          },
          "discountedSalesPrice": {
            "price": 45.0, 
            "dateFrom": null,
            "dateTo": null,
            "scales": []
          },
          "purchasePrice": {
            "price": 40.0, 
            "dateFrom": null,
            "dateTo": null,
            "scales": []
          },
          "customerGroupProductPrices": [
            {
              "price": 48.0, 
              "customerGroupId": { 
                "myLionId": 123, 
                "externalId": "EXT_CUSTOMER_GROUP_1"
              }
            }
          ],
          "customerGroupProductDiscounts": [
            {
              "discountedPrice": 40.0,
              "discountPercentage": 10.0,
              "customerGroupId": { 
                "myLionId": 123, 
                "externalId": "EXT_CUSTOMER_GROUP_1"
              },
              "dateFrom": "2024-01-01T00:00:00Z",
              "dateTo": "2024-12-31T23:59:59Z"
            }
          ]
        },
        "template": "Template1",
        "externalTemplateId": "EXT_TMPL_123",
        "attributes": [
          {
            "attributeMyLionId": 101, 
            "attributeExternalId": "EXT_ATTR_101",
            "type": "S",
            "label": "Color",
            "labelTranslations": [
              { "language": "en", "translation": "Color" },
              { "language": "hu", "translation": "Szín" }
            ],
            "position": 1,
            "variation": true,
            "value": "Red",
            "valueMyLionId": 201,
            "valueExternalId": "EXT_VAL_201",
            "valueTranslations": [
              { "language": "en", "translation": "Red" },
              { "language": "hu", "translation": "Piros" }
            ],
            "values": []
          }
        ],
        "images": [
          {
            "fileName": "product-123.jpg",
            "originalFileName": "original-product.jpg",
            "imageValueInBase64": null,
            "fileUrl": "https://cdn.example.com/product-123.jpg",
            "isDefaultPicture": true
          }
        ],
        "categories": [{ "myLionId": 123, "externalId": "EXT_CAT_123" }],
        "active": true,
        "commodityCode": "84714900",
        "countryOfOrigin": "HU"
      },
      "variants": [ 
        {
          "id": { "myLionId": 124, "externalId": "EXT_PROD_124" }, 
          "type": "variant", 
          "parentId": { "myLionId": 123, "externalId": "EXT_PROD_123" }, 
          "code": "PROD123-RED-S",
          "..."  : "..."
        }
      ]
    }
  ],
  "templates": [ 
    {
      "id": { 
        "myLionId": 123, 
        "externalId": "EXT_TEMPLATE_123"
      },
      "name": "Product Template", 
      "attributes": [
        {
          "myLionId": 101, 
          "externalId": "EXT_ATTR_101",
          "label": "Color", 
          "labelTranslations": [
            { "language": "en", "translation": "Color" },
            { "language": "hu", "translation": "Szín" }
          ],
          "type": "S", 
          "valueSet": [
            {
              "myLionId": 201, 
              "defaultTranslation": "Red",
              "valueTranslations": [
                { "language": "en", "translation": "Red" }
              ]
            }
          ],
          "isUsedForProductVariation": true,
          "isMandatory": false
        }
      ]
    }
  ],
  "independentAttributes": [ 
    {
      "myLionId": 201, 
      "externalId": "EXT_ATTR_201",
      "label": "Material", 
      "labelTranslations": [
        { "language": "en", "translation": "Material" }
      ],
      "type": "S", 
      "valueSet": [],
      "isUsedForProductVariation": false,
      "isMandatory": false
    }
  ],
  "customerGroups": [ 
    {
      "id": { 
        "myLionId": 123, 
        "externalId": "EXT_CUSTOMER_GROUP_1"
      },
      "name": "Customer Group 1" 
    }
  ],
  "categoryTree": [ 
    {
      "id": { 
        "myLionId": 10, 
        "externalId": "EXT_CAT_10"
      },
      "descriptions": [ 
        { "language": "en", "name": "Electronics" }
      ],
      "children": [ 
        {
          "id": { "myLionId": 11, "externalId": "EXT_CAT_11" }, 
          "descriptions": [{ "language": "en", "name": "Laptops" }],
          "children": []
        }
      ]
    }
  ]
}
{
  "supplierType": "MACMA", 
  "productTree": [ 
    {
      "product": { 
        "id": { 
          "myLionId": 123, 
          "externalId": "EXT_PROD_123"
        },
        "type": "variable", 
        "isService": false, 
        "parentId": null,
        "code": "PROD123", 
        "parentCode": null,
        "codeManufacturer": "MANU123",
        "brand": "Adidas",
        "taxClass": "27%", 
        "barCode": "123456789",
        "measureWarehouse": {
          "name": "Piece",
          "shortName": "pcs",
          "isoCode": "C62"
        },
        "weight": { "value": 1.5, "measure": "kg" },
        "netWeight": { "value": 1.2, "measure": "kg" },
        "sizeX": { "value": 10.0, "measure": "cm" },
        "sizeY": { "value": 15.0, "measure": "cm" },
        "sizeZ": { "value": 5.0, "measure": "cm" },
        "diameter": { "value": 5.0, "measure": "cm" },
        "descriptions": [ 
          {
            "language": "en", 
            "name": "Product Name", 
            "longDescription": "Long description.",
            "shortDescription": "Short description.",
            "searchKeywords": "keyword1, keyword2",
            "measureWarehouse": {
              "name": "Piece",
              "shortName": "pcs",
              "isoCode": "C62"
            }
          }
        ],
        "manufacturingQuantity": 5.0,
        "price": {
          "salesPrice": {
            "price": 50.0, 
            "dateFrom": null,
            "dateTo": null,
            "scales": [{ "minimumQuantity": 5, "price": 45.0 }]
          },
          "discountedSalesPrice": {
            "price": 45.0, 
            "dateFrom": null,
            "dateTo": null,
            "scales": []
          },
          "purchasePrice": {
            "price": 40.0, 
            "dateFrom": null,
            "dateTo": null,
            "scales": []
          },
          "customerGroupProductPrices": [
            {
              "price": 48.0, 
              "customerGroupId": { 
                "myLionId": 123, 
                "externalId": "EXT_CUSTOMER_GROUP_1"
              }
            }
          ],
          "customerGroupProductDiscounts": [
            {
              "discountedPrice": 40.0,
              "discountPercentage": 10.0,
              "customerGroupId": { 
                "myLionId": 123, 
                "externalId": "EXT_CUSTOMER_GROUP_1"
              },
              "dateFrom": "2024-01-01T00:00:00Z",
              "dateTo": "2024-12-31T23:59:59Z"
            }
          ]
        },
        "template": "Template1",
        "externalTemplateId": "EXT_TMPL_123",
        "attributes": [
          {
            "attributeMyLionId": 101, 
            "attributeExternalId": "EXT_ATTR_101",
            "type": "S",
            "label": "Color",
            "labelTranslations": [
              { "language": "en", "translation": "Color" },
              { "language": "hu", "translation": "Szín" }
            ],
            "position": 1,
            "variation": true,
            "value": "Red",
            "valueMyLionId": 201,
            "valueExternalId": "EXT_VAL_201",
            "valueTranslations": [
              { "language": "en", "translation": "Red" },
              { "language": "hu", "translation": "Piros" }
            ],
            "values": []
          }
        ],
        "images": [
          {
            "fileName": "product-123.jpg",
            "originalFileName": "original-product.jpg",
            "imageValueInBase64": null,
            "fileUrl": "https://cdn.example.com/product-123.jpg",
            "isDefaultPicture": true
          }
        ],
        "categories": [{ "myLionId": 123, "externalId": "EXT_CAT_123" }],
        "active": true,
        "commodityCode": "84714900",
        "countryOfOrigin": "HU"
      },
      "variants": [ 
        {
          "id": { "myLionId": 124, "externalId": "EXT_PROD_124" }, 
          "type": "variant", 
          "parentId": { "myLionId": 123, "externalId": "EXT_PROD_123" }, 
          "code": "PROD123-RED-S",
          "..."  : "..."
        }
      ]
    }
  ],
  "templates": [ 
    {
      "id": { 
        "myLionId": 123, 
        "externalId": "EXT_TEMPLATE_123"
      },
      "name": "Product Template", 
      "attributes": [
        {
          "myLionId": 101, 
          "externalId": "EXT_ATTR_101",
          "label": "Color", 
          "labelTranslations": [
            { "language": "en", "translation": "Color" },
            { "language": "hu", "translation": "Szín" }
          ],
          "type": "S", 
          "valueSet": [
            {
              "myLionId": 201, 
              "defaultTranslation": "Red",
              "valueTranslations": [
                { "language": "en", "translation": "Red" }
              ]
            }
          ],
          "isUsedForProductVariation": true,
          "isMandatory": false
        }
      ]
    }
  ],
  "independentAttributes": [ 
    {
      "myLionId": 201, 
      "externalId": "EXT_ATTR_201",
      "label": "Material", 
      "labelTranslations": [
        { "language": "en", "translation": "Material" }
      ],
      "type": "S", 
      "valueSet": [],
      "isUsedForProductVariation": false,
      "isMandatory": false
    }
  ],
  "customerGroups": [ 
    {
      "id": { 
        "myLionId": 123, 
        "externalId": "EXT_CUSTOMER_GROUP_1"
      },
      "name": "Customer Group 1" 
    }
  ],
  "categoryTree": [ 
    {
      "id": { 
        "myLionId": 10, 
        "externalId": "EXT_CAT_10"
      },
      "descriptions": [ 
        { "language": "en", "name": "Electronics" }
      ],
      "children": [ 
        {
          "id": { "myLionId": 11, "externalId": "EXT_CAT_11" }, 
          "descriptions": [{ "language": "en", "name": "Laptops" }],
          "children": []
        }
      ]
    }
  ]
}
java
@Data
public class ProductCollectionDTO {
    private SupplierType supplierType;
    private List<CustomerGroupDTO> customerGroups;
    private List<ProductTreeDTO> productTree;
    private List<TemplateDTO> templates;
    private List<AttributeDTO> independentAttributes;
    private List<CategoryTreeDTO> categoryTree;
}

public enum SupplierType {
    ANDA, EASY_GIFTS, FALK_ROSS, GOLDING, INSPIRION,
    MACMA, MAKITO, MALFINI, MOB, PROMOBOX, STRICKER, UTT, XD_CONNECTS
}

@Data
public class ProductTreeDTO {
    private ProductDTO product;
    private List<ProductDTO> variants;
}

@Data
public class ProductDTO {
    private IdDTO id;
    private IdDTO parentId;
    private String type;           // SIMPLE, VARIABLE, VARIANT
    private String code;
    private String parentCode;
    private String codeManufacturer;
    private String brand;
    private String taxClass;
    private String barCode;
    private MeasureDTO measureWarehouse;
    private ValueWithMeasureDTO weight;
    private ValueWithMeasureDTO netWeight;
    private ValueWithMeasureDTO sizeX;
    private ValueWithMeasureDTO sizeY;
    private ValueWithMeasureDTO sizeZ;
    private ValueWithMeasureDTO diameter;
    private List<ProductInfoDTO> descriptions;
    private double manufacturingQuantity;
    private PriceDTO price;
    private String template;
    private String externalTemplateId;
    private List<AttributeValueDTO> attributes;
    private List<ProductImageDTO> images;
    private List<IdDTO> categories;
    private Boolean active;
    private Boolean isService;
    private String commodityCode;
    private String countryOfOrigin;
}

@Data
public class MeasureDTO {
    private String name;
    private String shortName;
    private String isoCode;
}

@Data
public class ProductInfoDTO {
    private String language;
    private String name;
    private String longDescription;
    private String shortDescription;
    private String searchKeywords;
    private MeasureDTO measureWarehouse;
}

@Data
public class AttributeValueDTO {
    private Integer attributeMyLionId;
    private String attributeExternalId;
    private String type;
    private String label;
    private List<TranslationDTO> labelTranslations;
    private Integer position;
    private Boolean variation;
    private String value;
    private Integer valueMyLionId;
    private String valueExternalId;
    private List<TranslationDTO> valueTranslations;
    private List<CodeDTO> values;
}

@Data
public class ProductImageDTO {
    private String fileName;
    private String originalFileName;
    private String imageValueInBase64;
    private String fileUrl;
    private Boolean isDefaultPicture;
}

@Data
public class AttributeDTO {
    private Integer myLionId;
    private String externalId;
    private String label;
    private List<TranslationDTO> labelTranslations;
    private String type;
    private List<CodeDTO> valueSet;
    private Boolean isUsedForProductVariation;
    private Boolean isMandatory;
}

@Data
public class TemplateDTO {
    private IdDTO id;
    private String name;
    private List<AttributeDTO> attributes;
}

@Data
public class CategoryTreeDTO {
    private IdDTO id;
    private List<CategoryInfoDTO> descriptions;
    private List<CategoryTreeDTO> children;
}

@Data
public class CategoryInfoDTO {
    private String language;
    private String name;
}

@Data
public class CustomerGroupDTO {
    private IdDTO id;
    private String name;
}

@Data
public class IdDTO {
    private Integer myLionId;
    private String externalId;
}
@Data
public class ProductCollectionDTO {
    private SupplierType supplierType;
    private List<CustomerGroupDTO> customerGroups;
    private List<ProductTreeDTO> productTree;
    private List<TemplateDTO> templates;
    private List<AttributeDTO> independentAttributes;
    private List<CategoryTreeDTO> categoryTree;
}

public enum SupplierType {
    ANDA, EASY_GIFTS, FALK_ROSS, GOLDING, INSPIRION,
    MACMA, MAKITO, MALFINI, MOB, PROMOBOX, STRICKER, UTT, XD_CONNECTS
}

@Data
public class ProductTreeDTO {
    private ProductDTO product;
    private List<ProductDTO> variants;
}

@Data
public class ProductDTO {
    private IdDTO id;
    private IdDTO parentId;
    private String type;           // SIMPLE, VARIABLE, VARIANT
    private String code;
    private String parentCode;
    private String codeManufacturer;
    private String brand;
    private String taxClass;
    private String barCode;
    private MeasureDTO measureWarehouse;
    private ValueWithMeasureDTO weight;
    private ValueWithMeasureDTO netWeight;
    private ValueWithMeasureDTO sizeX;
    private ValueWithMeasureDTO sizeY;
    private ValueWithMeasureDTO sizeZ;
    private ValueWithMeasureDTO diameter;
    private List<ProductInfoDTO> descriptions;
    private double manufacturingQuantity;
    private PriceDTO price;
    private String template;
    private String externalTemplateId;
    private List<AttributeValueDTO> attributes;
    private List<ProductImageDTO> images;
    private List<IdDTO> categories;
    private Boolean active;
    private Boolean isService;
    private String commodityCode;
    private String countryOfOrigin;
}

@Data
public class MeasureDTO {
    private String name;
    private String shortName;
    private String isoCode;
}

@Data
public class ProductInfoDTO {
    private String language;
    private String name;
    private String longDescription;
    private String shortDescription;
    private String searchKeywords;
    private MeasureDTO measureWarehouse;
}

@Data
public class AttributeValueDTO {
    private Integer attributeMyLionId;
    private String attributeExternalId;
    private String type;
    private String label;
    private List<TranslationDTO> labelTranslations;
    private Integer position;
    private Boolean variation;
    private String value;
    private Integer valueMyLionId;
    private String valueExternalId;
    private List<TranslationDTO> valueTranslations;
    private List<CodeDTO> values;
}

@Data
public class ProductImageDTO {
    private String fileName;
    private String originalFileName;
    private String imageValueInBase64;
    private String fileUrl;
    private Boolean isDefaultPicture;
}

@Data
public class AttributeDTO {
    private Integer myLionId;
    private String externalId;
    private String label;
    private List<TranslationDTO> labelTranslations;
    private String type;
    private List<CodeDTO> valueSet;
    private Boolean isUsedForProductVariation;
    private Boolean isMandatory;
}

@Data
public class TemplateDTO {
    private IdDTO id;
    private String name;
    private List<AttributeDTO> attributes;
}

@Data
public class CategoryTreeDTO {
    private IdDTO id;
    private List<CategoryInfoDTO> descriptions;
    private List<CategoryTreeDTO> children;
}

@Data
public class CategoryInfoDTO {
    private String language;
    private String name;
}

@Data
public class CustomerGroupDTO {
    private IdDTO id;
    private String name;
}

@Data
public class IdDTO {
    private Integer myLionId;
    private String externalId;
}

JSON Structure Explanation ​

The highlighted lines are the required properties.

  • supplierType: Identifies the supplier. Possible values: ANDA, EASY_GIFTS, FALK_ROSS, GOLDING, INSPIRION, MACMA, MAKITO, MALFINI, MOB, PROMOBOX, STRICKER, UTT, XD_CONNECTS.
  • productTree: The primary product structure in v2. Each entry groups a parent product with its variants. See Product Tree below.
  • templates: An array of all product templates. Always sent, even if unchanged. See Product Templates below.
  • independentAttributes: Standalone attributes not belonging to any template. Always sent, even if unchanged. See Independent Attributes below.
  • customerGroups: An array of all customer groups. Always sent, even if unchanged. See Customer Groups below.
  • categoryTree: The primary category structure in v2. Recursive hierarchy of categories. See Category Tree below.

IDs ​

MyLION uses two types of IDs to identify products and other entities. The first type is the MyLION ID — a unique Integer generated by MyLION. The second type is the external ID — a String you provide to identify products in your own system.

json
{
  "id": {
    "myLionId": 123,
    "externalId": "EXT_PROD_123"
  }
}
{
  "id": {
    "myLionId": 123,
    "externalId": "EXT_PROD_123"
  }
}

Hint for Processing the Payload ​

It is recommended to process in this order:

  1. Templates and Independent Attributes
  2. Customer Groups
  3. Category Tree
  4. Product Tree — process the product (parent) first, then variants

Product Tree ​

Each entry in productTree contains:

  • product: The parent product. Same structure as a product item (see Product Properties).
  • variants: An array of variant products. Each variant has the same structure as a product item.

Product Properties ​

FieldTypeDescription
idobjectUnique identifiers.
typeStringProduct type. Possible values: SIMPLE, VARIABLE, VARIANT.
isServiceBooleanWhether the product is a service.
parentIdobjectIdentifiers of the parent product, if one exists.
codeStringProduct code.
parentCodeStringParent product code, if one exists.
codeManufacturerStringManufacturer code.
brandStringBrand name.
taxClassStringTax class. See Tax Classes.
barCodeStringBarcode.
measureWarehouseobjectWarehouse measure unit. See below.
weightobjectGross weight (value, measure).
netWeightobjectNet weight (value, measure).
sizeXobjectSize X (value, measure).
sizeYobjectSize Y (value, measure).
sizeZobjectSize Z (value, measure).
diameterobjectDiameter (value, measure).
descriptionsArray<object>Multilingual product info. See below.
manufacturingQuantityDoubleCurrent producible quantity.
priceobjectPricing information. See Pricing.
templateStringTemplate name.
externalTemplateIdStringYour external ID for the template.
attributesArray<object>Attribute values for this product. See Attribute Values.
imagesArray<object>Product images. See below.
activeBooleanWhether the product is active.
commodityCodeStringCustoms commodity code.
countryOfOriginStringISO country code of origin.

measureWarehouse

FieldTypeDescription
nameStringFull name of the unit (e.g. Piece).
shortNameStringShort name (e.g. pcs).
isoCodeStringISO unit code (e.g. C62).

descriptions[]

FieldTypeDescription
languageStringISO 639-1 language code (e.g. en, hu).
nameStringProduct name.
shortDescriptionStringShort description.
longDescriptionStringLong description.
searchKeywordsStringSearch keywords.
measureWarehouseobjectLanguage-specific warehouse measure unit label. Same structure as product-level measureWarehouse.

images[]

FieldTypeDescription
fileNameStringStored file name.
originalFileNameStringOriginal file name.
imageValueInBase64StringBase64 encoded image content, if provided.
fileUrlStringURL to the image file.
isDefaultPictureBooleanWhether this is the default/main image.

Attribute Values ​

FieldTypeDescription
attributeMyLionIdIntegerMyLION ID of the attribute.
attributeExternalIdStringYour external ID of the attribute.
typeStringAttribute type. See Attribute Types.
labelStringDefault label of the attribute.
labelTranslationsArray<object>Translated labels (language, translation).
positionIntegerDisplay position of the attribute.
variationBooleanWhether this attribute is used for product variation.
valueStringThe value in human-readable form (single-value attributes only).
valueMyLionIdIntegerMyLION ID of the selected code value (code attributes only).
valueExternalIdStringYour external ID of the selected code value.
valueTranslationsArray<object>Translations of the value (language, translation).
valuesArray<object>Multiple selected values (multi-value code attributes). Each: myLionId, defaultTranslation, valueTranslations.

Pricing ​

  • salesPrice: Sales price. Contains price (net), dateFrom, dateTo, scales[] (minimumQuantity, price).
  • discountedSalesPrice: Discounted sales price. Same structure as salesPrice.
  • purchasePrice: Purchase price. Same structure as salesPrice.
  • customerGroupProductPrices[]: Customer group specific prices. Contains customerGroupId, price.
  • customerGroupProductDiscounts[]: Customer group discounts. Contains customerGroupId, discountedPrice, discountPercentage, dateFrom, dateTo.

Tax Classes ​

CodeDescription
5%5% VAT content
18%18% VAT content
27%27% VAT content
AAMPersonal tax exemption
TAMTax-exempt activity
KBAETTax-exempt intra-Community sales, without new means of transport
KBAUKTax-exempt sales of intra-Community new means of transport
EAMTax-exempt extra-Community product supply (export to a third country)
NAMTax-exempt on other grounds related to international transactions
ATKOutside the scope of VAT
EUFAD37Reverse charge transaction in another Member State (Section 37 of VAT Act)
EUFADEReverse transaction in another Member State, not subject to Section 37
EUENon-reverse charge transaction in another Member State
HOTransaction in a third country
FADReverse Charge VAT

Product Templates ​

Templates are always sent in the payload, even if unchanged.

FieldTypeDescription
idobjectUnique identifiers (myLionId, externalId).
nameStringTemplate name.
attributesArray<object>Attributes defined in this template. See Attribute Definition.

Independent Attributes ​

Standalone attributes not belonging to any template. Always sent, even if unchanged. Same structure as template attributes — see Attribute Definition.

Attribute Definition ​

Used in both templates[].attributes and independentAttributes.

FieldTypeDescription
myLionIdIntegerMyLION ID of the attribute.
externalIdStringYour external ID for the attribute.
labelStringDefault label.
labelTranslationsArray<object>Translated labels (language, translation).
typeStringSee Attribute Types.
valueSetArray<object>Possible code values (for L/M types). Each: myLionId, defaultTranslation, valueTranslations.
isUsedForProductVariationBooleanWhether the attribute drives product variants.
isMandatoryBooleanWhether the attribute is mandatory.

Attribute Types ​

CodeTypeDescription
NNumericInteger or float value.
SStringMax 2000 characters.
ATextareaString with no size limit.
BBooleantrue or false.
LListSingle selection from a code value set.
MMulti-ListMultiple selections from a code value set.

Category Tree ​

Hierarchical category structure.

FieldTypeDescription
idobjectUnique identifiers (myLionId, externalId).
descriptionsArray<object>Multilingual category names (language, name).
childrenArray<object>Nested subcategories. Same recursive structure.

Customer Groups ​

Always sent in the payload, even if unchanged.

FieldTypeDescription
idobjectUnique identifiers (myLionId, externalId).
nameStringCustomer group name.

Response ​

You can respond with the external IDs of the processed products. If provided, MyLION will update the external IDs accordingly. If no response is given, no error is generated — but providing a response is recommended so MyLION has your external IDs for future payloads.

json
[
  {
    "myLionId": 123,
    "externalId": "EXT_PROD_123"
  }
]
[
  {
    "myLionId": 123,
    "externalId": "EXT_PROD_123"
  }
]
java
@Data
public class MLProductResponseDTO {
    private Integer myLionId;
    private String externalId;
}
@Data
public class MLProductResponseDTO {
    private Integer myLionId;
    private String externalId;
}

Receiving Endpoint ​

bash
https://<your_base_url>/rest/mylion/v2/products
https://<your_base_url>/rest/mylion/v2/products

When MyLION sends a webhook notification, it will make a POST request to the specified endpoint. The expected response is HTTP OK (200).

Processing the Notification ​

Upon receiving the webhook notification, validate the authenticity of the incoming request using the webhook authentication method previously outlined. Process in the recommended order: Templates and Independent Attributes → Customer Groups → Category Tree → Product Tree (parent first, then variants).