An attribute group is a collection of attributes used to dynamically generate forms in the frontend. Each attribute represents a component of the form and defines how user input is collected and validated. Some endpoinds will return attributes groups that needs to be processed by the frontend to display the form field and get user inputs.
Each attribute in a group has a metadata field, whose format depends on the attribute type. Metadata is used for:Defining the display properties of the attribute Applying validation rules to ensure correct user input Parent-Child Attribute Dependencies Attributes can have a parent attribute, which is used to establish dependencies between attributes and user responses.Example: If a radio button has options Yes and No, selecting No might trigger an additional follow-up question (e.g., "Please specify why").In this case, the follow-up question (Attribute 2) will have: A parent ID referencing the initial question (Attribute 1) A parent value equal to the ID of the No response This dependency structure allows for dynamic form behavior based on user input.
Attribute groups are used in two main contexts:Attributes linked to sub clothes categories These attributes are associated with the item itself. Example: Size, color, material, etc.Attributes linked to services These attributes define service-related details. Example: For an alteration service like shortening a hem, the attribute might specify the length to be shortened in centimeters.