Warning: This document is for an old version of Grey Matter. The latest version is v10.1.0.

Catalog Management

PDEA Object

PDEA stands for Product DEscribing Attributes. All attributes that can be present in a product’s productAttributes should be defined as a PDEA object.

Todo

Verify if it’s mandatory to be put in the catalog

Attributes
field_name String representing the name of the field
field_data_type String representing the datatype of the field. Can be one of string, list, double, integer, boolean, or dict.
display_data This is a list of display_data objects that specify how to display this field in different locales. At least one locale must be speficied.
Display data attributes
locale The locale for which this object is defining how to display the field as a string. A locale is either a language code (like en) or a language in combination with a country (like en-us).
display_name This should be a UTF-8 string representing the field in the language of the locale above.

PDEA Sample JSON

{
    "field_name": "product_sku",
    "field_data_type": "string",
    "display_data": [
        {
            "display_name": "Product SKU",
            "locale": "en"
        }
    ]
}

Catalog Object

Catalog is an object that represents the exhaustive pdea list of a group of products.

Attributes
clientCatalogId This is a string representing the unique id of the catalog.
description

This is an optional string description of the catalog.

Todo

Check if this is actually optional.

exhaustive_pdea_list This should be the complete list of PDEA Objects that will be used in the products created under this catalog.

Catalog Sample JSON

{
    "clientCatalogId": "10",
    "description": "Primary Catalog",
    "exhaustive_pdea_list": [
        {
            "field_name": "product_sku",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Product SKU",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "client_id",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Client ID",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "Description",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Description",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "price",
            "field_data_type": "float",
            "display_data": [
                {
                    "display_name": "Float",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "uom",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "UOM",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "weight",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Weight",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "length",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Length",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "width",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Width",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "height",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Height",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "imageUrl",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Image URL",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "scan_required",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Scan Required",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "storage_strategy",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Storage Strategy",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "butler_eligible",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Butler Eligible",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "serialised",
            "field_data_type": "boolean",
            "display_data": [
                {
                    "display_name": "Serialised",
                    "locale": "en"
                }
            ]
        }
    ]
}

Retrieve a Catalog

Retrieve all Catalogs

GET /api-gateway/mdm-service/wms-masterdata/catalog

Retrieves all catalogs currently in the system.

Request Headers:
 
  • Accept – the response content type depends on Accept header
  • Authorization – OAuth token to authenticate
Response Headers:
 
Status Codes:
Example request:
GET /api-gateway/mdm-service/wms-masterdata/catalog HTTP/1.1
Host: example.com
Accept: application/json, text/javascript
Example response:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
[
    {
        "id": 10,
        "clientCatalogId": "gor_default_catalog",
        "description": "Default exhaustive pdea list",
        "exhaustive_pdea_list": []
    },
    {
        "id": 12,
        "clientCatalogId": "customer_default_catalog",
        "description": "Default exhaustive pdea list",
        "exhaustive_pdea_list": [
            {
                "id": 107,
                "field_name": "product_local_image_url",
                "field_data_type": "string",
                "display_data": [
                    {
                        "display_name": "product_local_image_url",
                        "locale": "en-US"
                    }
                ]
            },
            {
                "id": 108,
                "field_name": "product_sku",
                "field_data_type": "string",
                "display_data": [
                    {
                        "display_name": "製品SKU",
                        "locale": "ja-JP"
                    },
                    {
                        "display_name": "Product SKU",
                        "locale": "en-US"
                    }
                ]
            },
            {
                "id": 109,
                "field_name": "product_dimensions",
                "field_data_type": "list",
                "display_data": [
                    {
                        "display_name": "商品の寸法",
                        "locale": "ja-JP"
                    },
                    {
                        "display_name": "Product Dimensions",
                        "locale": "en-US"
                    }
                ]
            },
            {
                "id": 110,
                "field_name": "product_weight",
                "field_data_type": "double",
                "display_data": [
                    {
                        "display_name": "製品重量",
                        "locale": "ja-JP"
                    },
                    {
                        "display_name": "Product Weight",
                        "locale": "en-US"
                    }
                ]
            },
            {
                "id": 111,
                "field_name": "product_barcodes",
                "field_data_type": "string",
                "display_data": [
                    {
                        "display_name": "製品バーコード",
                        "locale": "ja-JP"
                    },
                    {
                        "display_name": "Product Barcodes",
                        "locale": "en-US"
                    }
                ]
            },
            {
                "id": 112,
                "field_name": "storage_strategy",
                "field_data_type": "string",
                "display_data": [
                    {
                        "display_name": "storage_strategy",
                        "locale": "en-US"
                    }
                ]
            },
            {
                "id": 113,
                "field_name": "product_category",
                "field_data_type": "string",
                "display_data": [
                    {
                        "display_name": "product_category",
                        "locale": "en-US"
                    }
                ]
            },
            {
                "id": 114,
                "field_name": "product_name",
                "field_data_type": "string",
                "display_data": [
                    {
                        "display_name": "product_name",
                        "locale": "en-US"
                    }
                ]
            },
            {
                "id": 115,
                "field_name": "product_price",
                "field_data_type": "integer",
                "display_data": [
                    {
                        "display_name": "product_price",
                        "locale": "en-US"
                    }
                ]
            },
            {
                "id": 119,
                "field_name": "DimensionUOM",
                "field_data_type": "string",
                "display_data": [
                    {
                        "display_name": "Dimension Unit of Measurement",
                        "locale": "en-US"
                    }
                ]
            },
            {
                "id": 120,
                "field_name": "WeightUOM",
                "field_data_type": "string",
                "display_data": [
                    {
                        "display_name": "Weight Unit of Measurement",
                        "locale": "en-US"
                    }
                ]
            },
            {
                "id": 121,
                "field_name": "length",
                "field_data_type": "double",
                "display_data": [
                    {
                        "display_name": "Length",
                        "locale": "en-US"
                    }
                ]
            },
            {
                "id": 122,
                "field_name": "width",
                "field_data_type": "double",
                "display_data": [
                    {
                        "display_name": "Width",
                        "locale": "en-US"
                    }
                ]
            },
            {
                "id": 123,
                "field_name": "height",
                "field_data_type": "double",
                "display_data": [
                    {
                        "display_name": "height",
                        "locale": "en-US"
                    }
                ]
            },
            {
                "id": 124,
                "field_name": "weight",
                "field_data_type": "dict",
                "display_data": [
                    {
                        "display_name": "Weight",
                        "locale": "en-US"
                    }
                ]
            },
            {
                "id": 125,
                "field_name": "Description",
                "field_data_type": "string",
                "display_data": [
                    {
                        "display_name": "Description",
                        "locale": "en-US"
                    }
                ]
            },
            {
                "id": 129,
                "field_name": "exclusion_tags",
                "field_data_type": "dict",
                "display_data": [
                    {
                        "display_name": "exclusion tags",
                        "locale": "en-US"
                    }
                ]
            },
            {
                "id": 131,
                "field_name": "butler_eligible",
                "field_data_type": "boolean",
                "display_data": [
                    {
                        "display_name": "butler eligible",
                        "locale": "en-US"
                    }
                ]
            }
        ]
    }
]

Create or Update a Catalog

POST /api-gateway/mdm-service/wms-masterdata/catalog

To create or update a catalog, a Catalog Object has to be sent in a HTTP POST request to the above endpoint. The newly created or modified object will be returned in the response if the request is successful.

Request Headers:
 
  • Content-Type – the request’s content-type has to be passed in this header
  • Accept – the response content type depends on Accept header
  • Authorization – OAuth token to authenticate
Status Codes:
Example request:
POST /api-gateway/mdm-service/wms-masterdata/catalog HTTP/1.1
Host: example.com
Content-Type: application/json
Accept: application/json, text/javascript
{
    "clientCatalogId": "10",
    "description": "Primary Catalog",
    "exhaustive_pdea_list": [
        {
            "field_name": "product_sku",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Product SKU",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "client_id",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Client ID",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "Description",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Description",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "price",
            "field_data_type": "float",
            "display_data": [
                {
                    "display_name": "Float",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "uom",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "UOM",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "weight",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Weight",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "length",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Length",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "width",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Width",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "height",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Height",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "imageUrl",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Image URL",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "scan_required",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Scan Required",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "storage_strategy",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Storage Strategy",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "butler_eligible",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Butler Eligible",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "serialised",
            "field_data_type": "boolean",
            "display_data": [
                {
                    "display_name": "Serialised",
                    "locale": "en"
                }
            ]
        }
    ]
}
Example Response:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
    "clientCatalogId": "10",
    "description": "Primary Catalog",
    "exhaustive_pdea_list": [
        {
            "field_name": "product_sku",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Product SKU",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "client_id",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Client ID",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "Description",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Description",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "price",
            "field_data_type": "float",
            "display_data": [
                {
                    "display_name": "Float",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "uom",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "UOM",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "weight",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Weight",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "length",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Length",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "width",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Width",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "height",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Height",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "imageUrl",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Image URL",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "scan_required",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Scan Required",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "storage_strategy",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Storage Strategy",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "butler_eligible",
            "field_data_type": "string",
            "display_data": [
                {
                    "display_name": "Butler Eligible",
                    "locale": "en"
                }
            ]
        },
        {
            "field_name": "serialised",
            "field_data_type": "boolean",
            "display_data": [
                {
                    "display_name": "Serialised",
                    "locale": "en"
                }
            ]
        }
    ]
}

Delete a Catalog

Todo

Fid out if this is supported.