Classification Predictions

Predictions are suggestions for how products might be classified. The following examples show the format of the service requests and responses. The service API is documented in detail in Swagger available at https://app.stibosystems.com/ds/mlac/v1.

The prediction resource https://app.stibosystems.com/ds/mlac/v1/predict accepts POST requests with a JSON message body.

In STEP, the predict request can be sent from a business action via a gateway integration endpoint. For more information, see the topics in this section:

Example Request

The request can contain information about a single or multiple unclassified products. Responses are synchronous with a number of classification predictions for each product.

The request body format is:

{
  "products": [
    {
      "id": "string",
      "sourceId": "string",
      "description": "string"
    }
  ]
} 

The request body fields are:

The request query parameters are:

Example Response

A response for a single product, for two hierarchies with IDs ‘primary’ and ‘gs’ with ‘maxSuggestionsPerHierarchy’ set to 2, could look as follows:

{
  "predictions": [
    {
      "id": "ABC-123",
      "hierarchies": [
        {
          "hierarchyId": "primary",
          "predictions": [
            {
              "classificationId": "Lvl4-16772",
              "confidence": 92
            },
            {
              "classificationId": "Lvl4-16723",
              "confidence": 72
            }
          ]
        },
        {
          "hierarchyId": "gs",
          "predictions": [
            {
              "classificationId": "Bike Wheels",
              "confidence": 95
            },
            {
              "classificationId": "Bike Wheel Parts",
              "confidence": 69
            }
          ]
        }
      ]
    }
  ]
}

 

Notice that each prediction is accompanied with a confidence number indicating how confident the service is about the prediction.