UC2 Schemas

Collection Items Schema

{
    "$schema": "http://json-schema.org/draft-07/schema",
    "$id": "https://etryon-h2020.eu/schema/uc2/collection_items.json",
    "type": "object",
    "title": "The root schema",
    "description": "The root schema comprises the entire JSON document.",
    "default": {},
    "examples": [
        {
            "name": "My cool outfit",
            "created": "1519211809934",
            "status": "pending",
            "garment_id": "7611366000042",
            "group_id": "550851",
            "user_media": "https://firebasestorage.googleapis.com/v0/b/etryon-h2020.appspot.com/o/photo%user%enK0PQ8YY0hXDICJm1MKfjYTTvu1%filename.jpg",
            "output": "https://firebasestorage.googleapis.com/v0/b/etryon-h2020.appspot.com/o/output%user%enK0PQ8YY0hXDICJm1MKfjYTTvu1%filename.jpg",
            "type": "photo"
        }
    ],
    "required": [
        "name",
        "created",
        "status",
        "garment_id",
        "user_media",
        "output",
        "type"
    ],

    "properties": {
        "name": {
            "$id": "#/properties/name",
            "default": "",
            "description": "A user generated title for the collection item",
            "examples": [
                "My cool outfit"
            ],
            "title": "The name property",
            "type": "string"
        },
        "created": {
            "$id": "#/properties/created",
            "default": "",
            "description": "Timestamp in milliseconds, created when submitting a collection item",
            "examples": [
                "1519211809934"
            ],
            "title": "The created property",
            "type": "string"
        },
        "status": {
            "$id": "#/properties/status",
            "default": "pending",
            "description": "The status of a collection item. Default is 'pending'. Changes to 'ready' when output file is submitted.",
            "examples": [
                "pending",
                "ready",
                "error"
            ],
            "title": "The status property",
            "type": "string"
        },
        "garment_id": {
            "$id": "#/properties/garment_id",
            "default": "",
            "description": "ODLO garment entry EAN CODE (14 digit)",
            "examples": [
                "7611366000042"
            ],
            "title": "The garment_id property",
            "type": "string"
        },
        "group_id": {
            "$id": "#/properties/group_id",
            "default": "",
            "description": "ODLO group_id (6 digit)",
            "examples": [
                "550851"
            ],
            "title": "The group id property.",
            "type": "string"
        },
        "user_media": {
            "$id": "#/properties/user_media",
            "default": "",
            "description": "The filename of user uploaded media item that is stored in Firebase Storage, using a Timestamp in milliseconds.",
            "examples": [
                "user-media-1519211809934.jpg"
            ],
            "title": "The user_media property",
            "type": "string"
        },
        "output": {
            "$id": "#/properties/output",
            "default": "",
            "description": "The filename of the composition service created image that is stored in Firebase Storage, using a Timestamp in milliseconds.",
            "examples": [
                "output-1519211809934.jpg"
            ],
            "title": "The output property",
            "type": "string"
        },
        "type": {
            "$id": "#/properties/type",
            "default": "photo",
            "description": "The type of a collection item. Can either be photo or video",
            "examples": [
                "photo",
                "video"
            ],
            "title": "The type property",
            "type": "string"
        }
    }
}

Garment Suggestions Schema

{
    "$schema": "http://json-schema.org/draft-07/schema",
    "$id": "https://etryon-h2020.eu/schema/uc2/garment_suggestions.json",
    "type": "object",
    "title": "The root schema",
    "description": "The root schema comprises the entire JSON document.",
    "default": {},
    "examples": [
        {
            "user_id": "435",
            "garment_ids": [
                "43223432",
                "53246342342",
                "43635745234"
            ]
        }
    ],
    "required": [
        "user_id",
        "garment_ids"
    ],
    "properties": {
        "user_id": {
            "$id": "#/properties/user_id",
            "default": "",
            "description": "The user Id",
            "examples": [
                "435"
            ],
            "title": "The user_id property",
            "type": "string"
        },
        "garment_ids": {
            "$id": "#/properties/garment_ids",
            "default": [],
            "description": "An array that features ids for the garment suggestions of each user.",
            "examples": [
                [
                    "43223432",
                    "53246342342"
                ]
            ],
            "title": "The garment_ids array",
            "type": "array",
            "additionalItems": false,
            "items": {
                "$id": "#/properties/garment_ids/items",
                "anyOf": [
                    {
                        "$id": "#/properties/garment_ids/items/anyOf/0",
                        "default": "",
                        "description": "A garment id",
                        "examples": [
                            "43223432",
                            "53246342342"
                        ],
                        "title": "The first anyOf property",
                        "type": "string"
                    }
                ]
            }
        }
    }
}

Garments Schema

{
    "$schema": "http://json-schema.org/draft-07/schema",
    "$id": "https://etryon-h2020.eu/schema/uc2/garments.json",
    "type": "object",
    "title": "The root schema",
    "description": "The root schema comprises the entire JSON document.",
    "default": {},
    "examples": [
        {
            "title": "REVOLUTION LIGHT langärmeliges Baselayer Shirt",
            "eshop_link": "https://www.odlo.com/7611366000042.html",
            "uid": "7611366000042",
            "group_id": "391772",
            "material": "100% Polyester",
            "product_type": {
                "full_type": "Men>Sporting Activity>Running & Trail",
                "extracted_type_0": "Men",
                "extracted_type_1": "Sporting Activity",
                "extracted_type_2": "Running & Trail"
            },
            "price": "64.95",
            "additional_information": {
                "custom_label_0": "",
                "custom_label_1": "Warm",
                "custom_label_2": "",
                "custom_label_3": "oekotex"
            },
            "gender": "male",
            "size": "M",
            "color": "directoire blue",
            "color_code": "15700",
            "photo": "https://click.cptrack.de/?rd=true&k=rXK5MERxr0OxIUPXDyoj7-2y22xETFU22pNdMFGuQXDUbYjHA_BLt09OLT8cF4k6v9egB14mTsTo9GB4eBPQwQ~~&rdlink=https%3A%2F%2Fwww.odlo.com%2Fon%2Fdemandware.static%2F-%2FSites-odlo-master-catalog%2Fdefault%2Fdw3895ef55%2Fimages%2Flarge%2F211874.jpg",
            "tryon": "false"
        }
    ],
    "required": [
        "title",
        "eshop_link",
        "uid",
        "group_id",
        "material",
        "product_type",
        "price",
        "additional_information",
        "gender",
        "size",
        "color",
        "color_code",
        "photo",
        "tryon"
    ],
    "properties": {
        "title": {
            "$id": "#/properties/title",
            "default": "",
            "description": "The garment entry title",
            "examples": [
                "REVOLUTION LIGHT langärmeliges Baselayer Shirt"
            ],
            "title": "The title property",
            "type": "string"
        },
        "eshop_link": {
            "$id": "#/properties/eshop_link",
            "default": "",
            "description": "A URL that links to the specific garment in the ODLO e-shop",
            "examples": [
                "https://www.odlo.com/7611366000042.html"
            ],
            "title": "The eshop_link property",
            "type": "string"
        },
        "uid": {
            "$id": "#/properties/uid",
            "default": "",
            "description": "Each garment has a unique ID (EAN code)",
            "examples": [
                "7611366000042"
            ],
            "title": "The uid property",
            "type": "string"
        },
        "group_id": {
            "$id": "#/properties/group_id",
            "default": "",
            "description": "Each garment irregardless of size and color, has a unique id which is the group id property.",
            "examples": [
                "391772"
            ],
            "title": "The group_id property",
            "type": "string"
        },
        "material": {
            "$id": "#/properties/material",
            "default": "",
            "description": "The garment material",
            "examples": [
                "100% Polyester"
            ],
            "title": "The material property",
            "type": "string"
        },
        "product_type": {
            "$id": "#/properties/product_type",
            "default": {},
            "description": "This is provided by ODLO as a full type. We further break it down into 3 distinct types, for advanced filtering.",
            "examples": [
                {
                    "full_type": "Men>Sporting Activity>Running & Trail",
                    "extracted_type_0": "Men",
                    "extracted_type_1": "Sporting Activity",
                    "extracted_type_2": "Running & Trail"
                }
            ],
            "required": [
                "full_type",
                "extracted_type_0",
                "extracted_type_1",
                "extracted_type_2"
            ],
            "title": "The product_type object",
            "type": "object",
            "properties": {
                "full_type": {
                    "$id": "#/properties/product_type/properties/full_type",
                    "default": "",
                    "description": "the full type property of a garment. It is a long string consisted of some tags",
                    "examples": [
                        "Men>Sporting Activity>Running & Trail"
                    ],
                    "title": "The full_type property",
                    "type": "string"
                },
                "extracted_type_0": {
                    "$id": "#/properties/product_type/properties/extracted_type_0",
                    "default": "",
                    "description": "The first type term extracted from full type string",
                    "examples": [
                        "Men"
                    ],
                    "title": "The extracted_type_0 property",
                    "type": "string"
                },
                "extracted_type_1": {
                    "$id": "#/properties/product_type/properties/extracted_type_1",
                    "default": "",
                    "description": "The seconds type term extracted from full type string",
                    "examples": [
                        "Sporting Activity"
                    ],
                    "title": "The extracted_type_1 property",
                    "type": "string"
                },
                "extracted_type_2": {
                    "$id": "#/properties/product_type/properties/extracted_type_2",
                    "default": "",
                    "description": "The third type term extracted from full type string",
                    "examples": [
                        "Running & Trail"
                    ],
                    "title": "The extracted_type_2 property",
                    "type": "string"
                }
            }
        },
        "price": {
            "$id": "#/properties/price",
            "default": "",
            "description": "The garment price",
            "examples": [
                "64.95"
            ],
            "title": "The price property",
            "type": "string"
        },
        "additional_information": {
            "$id": "#/properties/additional_information",
            "default": {},
            "description": "This object consists of four different fields that contain information that further describe the garment",
            "examples": [
                {
                    "custom_label_0": "",
                    "custom_label_1": "Warm",
                    "custom_label_2": "",
                    "custom_label_3": "oekotex"
                }
            ],
            "required": [
                "custom_label_0",
                "custom_label_1",
                "custom_label_2",
                "custom_label_3"
            ],
            "title": "The additional_information object",
            "type": "object",
            "properties": {
                "custom_label_0": {
                    "$id": "#/properties/additional_information/properties/custom_label_0",
                    "default": "",
                    "description": "The first field that further describes the garment item",
                    "examples": [
                        ""
                    ],
                    "title": "The custom_label_0 property",
                    "type": "string"
                },
                "custom_label_1": {
                    "$id": "#/properties/additional_information/properties/custom_label_1",
                    "default": "",
                    "description": "The second field that further describes the garment item",
                    "examples": [
                        "Warm"
                    ],
                    "title": "The custom_label_1 property",
                    "type": "string"
                },
                "custom_label_2": {
                    "$id": "#/properties/additional_information/properties/custom_label_2",
                    "default": "",
                    "description": "The third field that further describes the garment item",
                    "examples": [
                        ""
                    ],
                    "title": "The custom_label_2 property",
                    "type": "string"
                },
                "custom_label_3": {
                    "$id": "#/properties/additional_information/properties/custom_label_3",
                    "default": "",
                    "description": "The fourth field that further describes the garment item",
                    "examples": [
                        "oekotex"
                    ],
                    "title": "The custom_label_3 property",
                    "type": "string"
                }
            }
        },
        "gender": {
            "$id": "#/properties/gender",
            "default": "",
            "description": "This is male or female, for the fit to tailor male or female bodies",
            "examples": [
                "male",
                "female"
            ],
            "title": "The gender property",
            "type": "string"
        },
        "size": {
            "$id": "#/properties/size",
            "default": "",
            "description": "The garment size property 'Small' to 'XXL'",
            "examples": [
                "XS",
                "S",
                "M",
                "L",
                "XL",
                "XXL"
            ],
            "title": "The size property",
            "type": "string"
        },
        "color": {
            "$id": "#/properties/color",
            "default": "",
            "description": "The garment color",
            "examples": [
                "directoire blue"
            ],
            "title": "The color property",
            "type": "string"
        },
        "color_code": {
            "$id": "#/properties/color_code",
            "default": "",
            "description": "The garment colorway code",
            "examples": [
                "15700"
            ],
            "title": "The color code (colorway) property",
            "type": "string"
        },
        "photo": {
            "$id": "#/properties/photo",
            "default": "",
            "description": "A URL of the garment photo. The photo is hosted on ODLO server",
            "examples": [
                "https://click.cptrack.de/?rd=true&k=rXK5MERxr0OxIUPXDyoj7-2y22xETFU22pNdMFGuQXDUbYjHA_BLt09OLT8cF4k6v9egB14mTsTo9GB4eBPQwQ~~&rdlink=https%3A%2F%2Fwww.odlo.com%2Fon%2Fdemandware.static%2F-%2FSites-odlo-master-catalog%2Fdefault%2Fdw3895ef55%2Fimages%2Flarge%2F211874.jpg"
            ],
            "title": "The photo property",
            "type": "string"
        },
        "tryon": {
            "$id": "#/properties/tryon",
            "default": false,
            "description": "If true, the garment entry can be tried on using AR or previewed in 3D",
            "examples": [
                true,
                false
            ],
            "title": "The tryon property",
            "type": "boolean"
        }
    }
}

User Info Schema

{
    "$schema": "http://json-schema.org/draft-07/schema",
    "$id": "https://etryon-h2020.eu/schema/uc2/user_info.json",
    "type": "object",
    "title": "The root schema",
    "description": "The root schema comprises the entire JSON document.",
    "default": {},
    "examples": [
        {
            "avatar_gender": "male",
            "garment_gender": "male",
            "size": "L",
            "height":  "183",
			"avatar_id": "1657706423",
            "avatar_status": "ready"
        }
    ],
    "required": [
        "avatar_gender",
        "garment_gender",
        "size",
        "height",
		"avatar_id",
        "avatar_status"
    ],
    "properties": {
        "avatar_gender": {
            "$id": "#/properties/avatar_gender",
            "default": "",
            "description": "User set avatar gender, to be used on creating avatar",
            "examples": [
                "male",
                "female"
            ],
            "title": "The avatar gender property",
            "type": "string"
        },
        "garment_gender": {
            "$id": "#/properties/garment_gender",
            "default": "",
            "description": "User set avatar gender, to be used on filtering garments",
            "examples": [
                "male",
                "female"
            ],
            "title": "The garment gender property",
            "type": "string"
        },
        "size": {
            "$id": "#/properties/size",
            "default": "",
            "description": "Garment size, to be used when selecting a garment",
            "examples": [
                "XS",
                "S",
                "M",
                "L",
                "XL",
                "XXL"
            ],
            "title": "The size property",
            "type": "string"
        },
        "height": {
            "$id": "#/properties/height",
            "default": "",
            "description": "User height (in centimeters), to be used when creating an avatar",
            "examples": [
                "183",
                "178",
                "174"
            ],
            "title": "The height property",
            "type": "string"
        },
		"avatar_id": {
            "$id": "#/properties/avatar_id",
            "default": "",
            "description": "The avatar id. 11 digits.",
            "examples": [
                "1657706423"
            ],
            "title": "The avatar id property",
            "type": "string"
        },
        "avatar_status": {
            "$id": "#/properties/avatar_status",
            "default": "",
            "description": "The avatar status. ",
            "examples": [
                "ready",
                "pending",
                "error"
            ],
            "title": "The avatar status property",
            "type": "string"
        }
    }
}