GET /analyze/:token/similar_products

GET /analyze/{token}/similar_products

Returns products similar to the ingredient list analysis

Path parameters

  • token string(uuid) Required

    token reference to desired resource

Responses

  • 200

    successful operation

    Hide response attribute Show response attribute object
    • similar array[object]
      Hide similar attributes Show similar attributes array[object]
      • product_id integer
      • category_id integer
      • score integer
      • percent_match integer
  • 400

    Bad Request

  • 401

    Authorization information is missing or invalid.

  • 404

    Ingredient List Analysis Not Found

  • 422

    Unprocessable Entity

  • 500

    Server Error

GET /analyze/{token}/similar_products
curl \
 -X GET https://api.cosmily.com/api/v1/analyze/{token}/similar_products \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "similar": [
    {
      "product_id": 42,
      "category_id": 42,
      "score": 42,
      "percent_match": 42
    }
  ]
}
Response examples (200)
{
  "similar": [
    {
      "product_id": 42,
      "category_id": 42,
      "score": 42,
      "percent_match": 42
    }
  ]
}