General Usage Product API
Overview Model API Reference Docs

Product Models


The product model is pre-configured based on your specific requirements before API usage. This documentation aims to clarify the product model's functionality. The product model is composed of a list of available attributes and allowed variants. The available attributes define the attributes which can be supplied for a product as well as any value constraints. The allowed variants defines the type of variant a product can have in its variants list.

                {"name": "dress", "version": "0.1", "allowedVariant": {"name": "size", "allowedValues": ["38", "40", "42"]}, "availableAttributes": [{"key": "title", "type": "STRING", "allowedValues": [], "required": true}]}
            

Product Model

Within a product model there is a list of available attributes. These define the attributes that are considered mandatory for that product. The example below defines two required fields, title and description:
                {
                    "availableAttributes.": [
                        {"key": "title", "type": "STRING", "allowedValues": [], "required": true},
                        {"key": "number of pokka dots", "type": "INTEGER", "allowedValues": [], "required": false, "maxValue": 100, "minValue": 9}
                    ]
                }
            
Key
'key' defines the attribute key, this links the product model available attribute to an attribute in a product.
Type
'type' is the attribute type of the available attribute, a list of common attribute types are listed in the table below.
Allowed Values
'allowedValues' is a whitelist of values for a given attribute.
Required
'required' boolean defining whether a product requires this attribute to be valid.
Minimum Value
'minValue' this only applies to INTEGER and FLOAT, it is the minimum value allowed for the given attribute.
Maximum Value
'maxValue' this only applies to INTEGER and FLOAT, it is the maximum value allowed for the given attribute.

Attribute Types

Attribute types are a collection of both dynamic and static models, simple attribute types for example: STRING, INTEGER, etc., don't require definition but more complex attribute types like IMAGE have defined models which can be retrieved from /v1/attribute-type.

IMAGE attribute type model:
            {"name": "IMAGE","availableAttributes": [
                    {
                        "name": "url", 
                        "type": "STRING" 
                    }
                ]
            }
        
IMAGE attribute example:
            {
                "url":"https://fcdn.ingenuitylite.com/thg-investors/images/622b3f8a703d31eaedc6fa03/original-logo-png78x24.png"
            }
        
List of common static attribute types can be found in the table below:
Attribute Type Description
STRING A unicode text description
INTEGER Whole number, e.g. 3
FLOAT Decimal number, e.g. 3.45
DATE A date (with time zone) in ISO-8601 format, e.g. '2023‐07‐21T12:09:09+00:00 UTC+00:00'
BOOL A true/false
LIST List of a given attribute type
IMAGE A URL to an image to show on the website